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

Hello team am stuck, please help me figure out what is wrong with my code, thanks

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

Your browser information:

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

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`Preformatted text`

Welcome to the forum @godfreyagr066

You almost got it.
Please check the syntax of your ternary operator.

Happy coding

Thank you, It is finally working

1 Like