On step 96 I add the following code and pass the step:
audio.addEventListener("ended", () => {
const currentSongIndex = getCurrentSongIndex();
const nextSongExists = (userData.songs.length - 1) > currentSongIndex ? true : false;
});
Then on step 97 I see that the code for nextSongExists has been replaced by this:
const nextSongExists = userData?.songs[currentSongIndex + 1] !== undefined;
How are the two same?