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

Tell us what’s happening:

Help me do this challenge… I am stuck at this challenge.

Your code so far

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

/* file: styles.css */

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

  if (userData?.currentSong === null) {
    playSong(userData?.songs[0].id);
  } else {
        getCurrentSongIndex(currentSongIndex);
    }


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

Challenge Information:

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

You did not create the constant requested

and assign it to a constant named currentSongIndex .

Also note that getCurrentSongIndex should not have any argument

I cant understand that assigning a constant.

currentSongIndex = getCurrentSongIndex();

I think this is it.

when you create a variable you can use one of two keywords, one is let, but there is also an other one that let you create constant variables

ahhh Thank you i got it :slightly_smiling_face: