I entered the below code, i’m not clear about how to set condition for this.
whether currentTitle is truthy? ---- currentTitle !== “” ------ will that check currentTitle is true value
Hi!
You’ve set the conditions correctly (congratulations, it took me longer than I’d like to admit how this ternary operator works:D), you just need to set playingSong.textContent and songArtist.textContent to the values of variables currentTitle and currentArtist (you’ve set those two a few lines earlier), or to empty strings.
Hope that helps!
In your code, you’re assigning the string “currentTitle” to playingSong.textContent not the value of the currentTitle variable.
The ternary operator can be explain like :