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

Tell us what’s happening:

please help me out, I don’t know where I am getting it wrong

Your code so far

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

/* file: styles.css */

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

    resetButton.addEventListener("click", () => {
      userData.songs = [...allSongs];
      renderSongs(sortSongs(userData.songs));
      setPlayButtonAccessibleText();
      resetButton.remove();
      
      
    });

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

Challenge Information:

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

Can you talk about how you got stuck figuring out what’s wrong please?

the step said;
call the setPlayButtonAccessibleText function, call renderSongs function and pass sortSongs function as the parameter, then resetButton with remove() method

Sure, I read the instructions. But where did you get stuck?

I called all the functions but I could not pass the step

Did you call them in the same order as the instructions said?

the renderSongs();
I passed sortSongs() as the parameter like this

renderSongs(sortSongs);

it didn’t work, I had added () and passed userData.songs like this

renderSongs(sortSongs(userData.songs));

yes, I called them as the instruction said

This doesn’t seem to match

Call the renderSongs() function with sortSongs() as an argument to render the songs again in alphabetical order.

2 Likes

thank you , it worked

2 Likes

Hi, Chinaza good to have you here