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

Tell us what’s happening:

Could someone please point out what’s wrong with my code?
Question:
Use getElementById() to get the id of the currently playing song, then use template literals to prefix it with song- . Assign it to the constant songToHighlight .

Appreciate your help!

Your code so far

WARNING

The challenge seed code and/or your solution exceeded the maximum length we can port over from the challenge.

You will need to take an additional step here so the code you wrote presents in an easy to read format.

Please copy/paste all the editor code showing in the challenge from where you just linked.

const highlightCurrentSong = () => {
  const playlistSongElements = document.querySelectorAll(".playlist-song");
  const currentSongId = document.getElementById(`song-${userData?.currentSong?.id}`);
  const songToHighlight = document.getElementById('songToHighlight');
};

Your browser information:

User Agent is: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36

Challenge Information:

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

Hey @radka
Welcome to the community
You have to assign that to songToHighlight not to currentSongId
Happy coding

const highlightCurrentSong = (document.querySelectorAll".playlist-song"); => {
const playlistSongElements = highlightCurrentSong;
}
can someomne tell me what im doing wrong?