Tell us what’s happening:
Here is my code but it seems I’m missing something…
The test kepp failling with the message
// running tests 2. You should use the ternary operator to set the textContent property of playingSong to currentTitle or “”.
4. You should use the ternary operator to set the textContent property of songArtist to currentArtist or “”.
5. // tests completed
Your code so far
`currentTitle ? playingSong.textContent = currentTitle : currentTitle = “”;
currentArtist ? songArtist.textContent = currentArtist : currentArtist = “”;`
<!-- file: index.html -->
/* file: styles.css */
/* file: script.js */
// User Editable Region
const currentTitle = currentTitle ? playingSong.textContent = currentTitle : currentTitle = "";
const currentArtist = currentArtist ? songArtist.textContent = currentArtist : 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/129.0.0.0 Safari/537.36
Challenge Information:
Learn Basic String and Array Methods by Building a Music Player - Step 70