Build a music player - 37 - weird question marks

Hi,

There may be a mistake in the code.

const highlightCurrentSong = () => {
  const previousCurrentSong = document.querySelector('.playlist-song[aria-current="true"]');
  previousCurrentSong?.removeAttribute("aria-current");
Step 37

You need to get the id of the currently playing song. 
For this, you can use userData.currentSong?.id.

There’s a question mark in previousCurrentSong?.removeAttribute(“aria-current”); and another one in userData.currentSong?.id.

I have to keep these two question marks to pass the tests. Do they have a meaning or is this just a bug?

Greets,
Karin

Hi,

No, it’s not a bug. It’s something new and I didn’t know it existed.
FCC has an article on this.

Sorry, I really had no idea. This operator actually works.