I’m stuck at step 70 of building a music app . I’ve searched for help in the forum, sadly, still stuck. Here are the instructions:
Instructions:
Use a ternary operator to check if currentTitle evaluates to a truthy value. If it does, set playingSong.textContent to currentTitle. Otherwise, set it to an empty string.
Then below that, use a ternary operator to check if currentArtist is truthy. If so, set songArtist.textContent to currentArtist . Otherwise, set it to empty string.
Couple things here, first, when you use one equal sign “=” it is the assignment operator, you are attempting to assign the value true to the variable currentTitle. The comparison operators are “==” or “===” (more info on the difference here).
However, you don’t want to make that comparison in the first place. currentTitle is a string, and thus will never equal true, which is a boolean. It can however be truthy if the string is non empty. You had the comparison part correct in your two lines above this.