Learn-basic-string-and-array-methods-by-building-a-music-player/step-70

What´s up people, I´ve been trying to get this exercise and nothing, could anyone light me up?

textContent sets the text of a node and allows you to set or retrieve the text content of an HTML element.

<div id="example">This is some text content</div>
const element = document.getElementById('example');
console.log(element.textContent); // Output: This is some text content

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.

**THIS IS MY CODE **

const currentTitle = currentTitle ? playingSong.textContent : “”;
const currentArtist = currentArtist ? songArtist.textContent : “”;

};

const currentTitle = currentTitle ? playingSong.textContent : "";
 const currentArtist = currentArtist ? songArtist.textContent : "";

Link your topic to the challenge step. Then we can better help you.
@dubbydubby

you are not setting this, you are creating a new currentArtist variable, which you should not do, because you already have that variable

same for the other line

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.