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

Tell us what’s happening:

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.

if (userData?.currentSong === null){
  (playSong = userData?.songs[0].id);
}
}

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36

Challenge Information:

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

playSong is a function, it should call it () and pass userData?.songs[0].id as the argument.

fn(someArg)

playSong was declared using const you can not reassign it even if you wanted to. Also, doing that wouldn’t make sense.

1 Like

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