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

Tell us what’s happening:

Only one answer on this has been posted in the forum, and checking on it has not really pointed out what is wrong with the code below. Any ideas?

Your code so far

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

/* file: styles.css */

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

const shuffle = () => {
  userData?.songs.sort (() => Math.random() - 0.5);  
};

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

Challenge Information:

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

could it be the extra space between method name and parentheses?

Wow @ILM ! We got through a whole answer today without any insults on me! And oh yeah, it works perfectly!

This comment is disrespectful and entirely uncalled for. Someone took time out of their day to help you. Instead of being passive aggressive, consider being grateful.

Pulling things like this is a surefire way to get yourself removed from our communities.

1 Like