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

Tell us what’s happening:

Auto grader tells me to add to the addEventListener, then when I do it says not too

Your code so far

audio.addEventListener(“ended”, () => {
const currentSongIndex = getCurrentSongIndex();
if (userData.songs.length - 1 > currentSongIndex) {
let nextSongExists = true;
} else {
let nextSongExists = false;


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.

Replace these two sentences with your copied code.
Please leave the ``` line above and the ``` line below,
because they allow your code to properly format in the post.

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/ Safari/537.36

Challenge Information:

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

There is an issue with the tests.

A fix was pushed up here.

It should show up on the live site within a few days.
For now, just move onto the next step



I´m also stuck here.
Tried several solutions but still not sure if i should wrap the constants inside the EventListener. Everytime i try it replys that i shloud not change the content of the eventlistener…

it would be best to open up your own topic and we can assist your there with your code :+1:

Sure, i´ll do it in a few days. I got the impression the answer is somehow buggy, since we can get to a correct result (Boolean either way) in several ways. To complete the course i´ll definitely wanna resolve this 87th step :wink:
Will wait for further development on this…

I’m also stuck here. I don’t get what they are asking me to do exactly

do we know if the fix was pushed? i’m having the same issue with nearly identical code. thank you

The fix was merged in over a week ago.

It should be live on the site by now.

If you are having issues, it would be best to create a separate post with your code so we can see what is happening :+1: