Tell us what’s happening:
I have a feeling inside my heart that my first chunk of code is right:
const playSong = (id) => {
const song = userData?.songs.find(song)
but I am feeling very not confident about the subsequent chunk:
=> (song.id === id)
};
I am feeling lost, my friends. I am getting the error message "Your find
method should use strict equality to check if song.id
is equal to id
. I am pretty sure I have accomplished that, but I am not sure how to connect the parts I am more confident in. Thank you!
Your code so far
<!-- file: index.html -->
/* file: styles.css */
/* file: script.js */
// User Editable Region
const playSong = (id) => {
const song = userData?.songs.find(song) => (song.id === id);
};
// User Editable Region
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36
Challenge Information:
Learn Basic String and Array Methods by Building a Music Player - Step 36