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

Tell us what’s happening:

I think my code is correct but still error message is displayed. Pls help.

Your code so far

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

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

audio.addEventListener("ended", () => {
  const currentSongIndex = getCurrentSongIndex();
});
  const nextSongExists = () => {
  (userData.songs.length - 1) > (currentSongIndex) ? true:false };

// User Editable Region
/* file: styles.css */

Your browser information:

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

Challenge Information:

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

hi there,

nextSongExists should not be an arrow function.

Got it. Got carried away with using arrow functions everywhere :sweat_smile: Thanks!!

2 Likes