Learn Basic String and Array Methods by Building a Music Player - Step 73

Tell us what’s happening:

Use the filter() method on userData?.songs . Pass in song as the parameter of the arrow function callback and use implicit return to check if song.id is strictly not equal to id . Assign all of that to the userData.songs .

Your code so far

const deleteSong = (id) => {
  userData?.songs.filter((song) => {
  userData.songs = song.id  !== id;
  });
};

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36

Challenge Information:

Learn Basic String and Array Methods by Building a Music Player - Step 73

Hi Edrubo! There are two things here you’ll need to fix. The first relates to the final instruction: Assign all of that to the `userData.songs.
The second relates to “implicit return”.

Thanks, but a little more on “implicit return” could help.

Hi Edrubo! Did you figure it out? If you search this forum for implicit return you will find some additional help plus a Google search could help you too. Searching for answers like this is an essential skill for all developers and it takes practice just as much as the actual coding.

But let me know if you still need some help!

Yes, I figured it out, thanks.

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.