Build a Music Player - Step 41

Tell us what’s happening:

function setPlayerDisplay()
{
playingSong.textContent = userData.currentSong.title ? userData.currentSong.title : ‘’;
songArtist.textContent = userData.currentSong.artist ? userData.currentSong.artist : ‘’;
}

I am not understanding why this isn’t passing. It seems like I’m doing exactly what is being asked but it’s not working?

Your code so far

<!-- file: index.html -->

/* file: styles.css */

/* file: script.js */
// User Editable Region

function setPlayerDisplay()
{
  playingSong.textContent = userData.currentSong.title ? userData.currentSong.title : '';
  songArtist.textContent = userData.currentSong.artist ? userData.currentSong.artist : '';
}

// 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/144.0.0.0 Safari/537.36

Challenge Information:

Build a Music Player - Step 41

Please take a look at highlightCurrentSong(). What is the chaining operator we use to safely access object properties that might be null or undefined?