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

i keep getting stuck

const playSong = (id) => {

const song = userData?.songs.find((id) => song.id > 25);

};

Your code so far

WARNING

The challenge seed code and/or your solution exceeded the maximum length we can port over from the challenge.

You will need to take an additional step here so the code you wrote presents in an easy to read format.

Please copy/paste all the editor code showing in the challenge from where you just linked.

Replace these two sentences with your copied code.
Please leave the ``` line above and the ``` line below,
because they allow your code to properly format in the post.

Your browser information:

User Agent is: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:123.0) Gecko/20100101 Firefox/123.0

Challenge Information:

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

Hi!

1- Look again the parameter the challenge asks you to use for the find method and compare it with yours. You should be able to figure it out.

2-The comparison operator (>) you use is not the good one.

Check again what the challenge asks, and which comparison operator you should use. Look for key word like more than, less than, equals to

3-You don’t have to look for the value of the id like you did here:

Just use the id variable itself.

const playSong = (id) => {

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

};

i know the solution is right in front of me but im still stuck
keep in mind im only a week old coder i only started last week :slight_smile:

i figured it out
brute force :muscle: :muscle: :muscle:

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