Learn basic string and array methods by building a music player step 30

I am stuck at step 30 , this is my code so far.

const playSong = (id) => {
const song = userData?.songs.find(song)=>{
if(song.id === id){

};

};
};

You’re close. Look at the example that’s given in the task.

const foundNumber = numbers.find((number) => number > 25);

You’ve got the right idea, incorrect syntax.

((song) => song.id === id);
1 Like