I tried different method such as
currentTitle = playingSong.textContent == true? playingSong.textContent= currentTitle : “”;
currentArtist = songArtist.textContent == true ? songArtist.textContent = currentArtist : “”;
I am confused on what to do next.
Your code so far
<!-- file: index.html -->
/* file: styles.css */
/* file: script.js */
// User Editable Region
currentTitle = playingSong.textContent ? playingSong.textContent= currentTitle : "";
currentArtist = songArtist.textContent ? songArtist.textContent = currentArtist : "";
// User Editable Region
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 Edg/131.0.0.0
Challenge Information:
Learn Basic String and Array Methods by Building a Music Player - Step 70
The question is asked in a confusing way. Here you are setting the textContent to the elements defined in the variables playingSong and SongArtist.
Look at the syntax of how to do that:
One = sign and the variable.textContent goes before the = sign. After the equal sign you are setting the value according to the ternary. If the condition is met, the value is x. If the condition is not met the value is y. Write the ternary according to the correct syntax. There is only 1 equal sign.