Build a Music Player - Step 41

Tell us what’s happening:

I think the logic is correct, but i’m confused why can’t pass the test.

Your code so far

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

/* file: styles.css */

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

const setPlayerDisplay = () => {
  if (getCurrentCurrentSongIndex() !== -1) {
    playingSong.textContent = userData.songs[getCurrentSongIndex()].title;
    songArtist.textContent = userData.songs[getCurrentSongIndex()].artist;
  }
  else {
    playingSong.textContent = "";
    songArtist.textContent = "";
  }
}

// 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/145.0.0.0 Safari/537.36 Edg/145.0.0.0

Challenge Information:

Build a Music Player - Step 41

getCurrentCurrengSongIndex is not defined

double check the function name

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.