Learn Basic String and Array Methods by Building a Music Player - Step 65

Tell us what’s happening:

INSTRUCTIONS:
Now you need to add the attribute back to the currently playing song.
Create an if statement with the condition songToHighlight. For the statement, use setAttribute on songToHighlight to pass in “aria-current” and “true” as the first and second arguments.
MY CODE:
if (songToHighlight) {
songToHighlight.setAttribute(“aria-current”, “true”)’
}
INSIDER TIP:
You should use the setAttribute() method on songToHighligt inside your if statement.
How is this not inside my if {}statement?

Your code so far

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

/* file: styles.css */

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

if (songToHighlight) {
  songToHighLight.setAttribute("aria-current","true");
}

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

Challenge Information:

Learn Basic String and Array Methods by Building a Music Player - Step 65

Capital L or small l in the word highlight?