Tell us what’s happening:
I already solved this challenge but I’m just wondering why my previous code didn’t work, removing the brackets around the condition solved the issue, but I want to know why is that the case? Aren’t you supposed to put them anyways?
Your code so far
<!-- file: index.html -->
/* file: styles.css */
/* file: script.js */
// User Editable Region
playingSong.textContent = (currentTitle) ? currentTitle : "";
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