Tell us what’s happening:
When i test in the preview window it works just fine ( i added setPlayerDisplay() to playSong() to run some tests), but i keep gettin’ this console errors : "You should use the ternary
operator to set the textContent
property of playingSong
to currentTitle
or ""
. " and with the songArtist too. Is it some bug with code camp or am i missing something ? why does it work on preview?
Your code so far
currentTitle ? playingSong.textContent = currentTitle : playingSong.textContent = “”;
currentArtist ? songArtist.textContent = songArtist : currentArtist.textContent = “”;
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36 OPR/107.0.0.0
Challenge Information:
Learn Basic String and Array Methods by Building a Music Player - Step 64