Music Player - Step 60

The challenge at step 60 or better the offered solution does not work. The solution offered is

playButton.setAttribute("aria-label", song?.title ? `Play ${song?.title}` : "Play");

What is wrong?

1 Like

Can you post the link to this step?

Ok, all you need is backticks placed around the If part of your code.

It is the extra optional chaining you have added to Play ${song?.title} inside the first condition.

Just in case it is unclear what I mean:

playButton.setAttribute("aria-label", song?.title ? `Play ${song.title}` : "Play");

I think the use of optional chaining is being updated as it was found to be inconsistent. This step might be part of the code getting updated but I don’t know.

1 Like