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

Tell us what’s happening:

It keeps throwing off an error and really confused as to what I am doing wrong

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.

 currentTitle ? currentTitle = playingSong.textContent : "";```

### Your browser information:

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

### Challenge Information:
Learn Basic String and Array Methods by Building a Music Player - Step 56
https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures-v8/learn-basic-string-and-array-methods-by-building-a-music-player/step-56

Hey @kingcyrxs47 ,

you forgot two things:

  • Firstly you should assign your ternary to “playingSong.textContent”.
  • Secondly you should add a second line of code doing the same for the Artist property.

This should be your result:

playingSong.textContent = currentTitle ? currentTitle : “”;
songArtist.textContent = currentArtist ? currentArtist : “”;

Hope I could help you buddy.
Greets
Reggi

1 Like

Wow! Thanks so much!

1 Like

You are welcome :wink:

Glad I could help