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

Is it possible that someone please tell me what am I doing wrong in here ?


You already have the index of the current song ( currentSongIndex).
You have to add 1 to this and this way you will get the index of the next song. Then with this value you have to check whether there is a song at all in the userData object, with the songs key.
Then with strict equality (===) you have to check that it is defined or undefined.

1 Like

Still dont get it :frowning:

I tried your code and it works, just one little typo here.

You need to use nextSongExists not nextsongExit.

1 Like

Thank you very much Mostafa you save my day :slightly_smiling_face: Just typing mistake took my several hours

1 Like