const example = condition ? "I'm true" : "I'm false";
You need to put the variable you are changing on the left of the equal sign.
So when they said:
set playingSong.textContent
They meant that this should go on the left of the equals.
Now we need to go back and read the instructions again:
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.
What is the thing we are checking according to this sentence?
We are checking if currentTitle is a truthy.
So we must write this variable name instead of the condition (in the location of the condition) to the left of the question mark.
And after that, we place the values we want when the condition evaluates to true (currentTitle) and to false (empty string).
Now that I’ve broken this part of the step down, please try again.
(Try to consider what is the condition, what is the variable that is changing, and what is the value in the case of true or false)
why do you think you need the const in the line?
const is used to declare variables right?
Are either playingSong.textContent or songArtist.textContent variables that need to be declared here?
edit: i think you put the const here because of the example? The example is just an example and since you are setting a variable only and not also declaring one, you don’t need the const.
I must say this step was a bit challenging based on how the ask is written out. I understand that it is meant to challenge the learner but this flat out confused me. I had to review 3 of these posts asking for help to get an idea of what I was doing wrong.