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

Tell us what’s happening:

I don’t understand what’s wrong with my code? Need some help

Your code so far

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

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

const pauseSong = () => {
  userData.songCurrentTime = audio.currentTime;
  playButton.classList.remove("playing");
  audio.pause();
};

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

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) 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 47

Hi there and welcome to our community!

Your code for Step 47 is not correct. You have code there which belongs to later steps.
In this step you should only be setting the songCurrentTime of the userData object to the currentTime of the audio variable.

Got it! It finally passed thank you so much! Had to remove the 2 lines of code below.