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

Tell us what’s happening:

keeps telling “yous should use the classList property…”

const pauseSong = () => {
userData.songCurrentTime = audio.currentTime;
classList.remove(‘playButton.playing’)
/* i tried to change this final part of playButton - and invert but tell the same error
audio.pause();
};

Your code so far

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

/* file: styles.css */

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

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

// 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/123.0.0.0 Safari/537.36

Challenge Information:

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

Also tried this variation… i didnt get it
nothing works

const pauseSong = () => {

userData.songCurrentTime = audio.currentTime;

playing.playButton.classList.remove();

audio.pause();

};

The .classList.remove() takes in whatever class you’re trying to remove, not unlike how .getElementById() takes in the id. I hope this points you in the right direction.

thanks man it didnt help but i solved it now. but thanks anyway. i apreciate it
my error was in this line “classList.remove(‘playButton.playing’)”

That’s what I was pointing out. Glad you solved it.