Need help with step 27 of music player project

Step 27

Now that you have the list of songs displayed on the screen, it would be nice to sort them in alphabetical order by title.

Start by creating an arrow function called sortSongs.

Hey!
Hit a block with this one…it’s asking for an arrow function and it doesn’t appear I have enough info to write one in the question. Here is my latest effort…

let sortSongs = () => {}

If you have a question about a specific challenge as it relates to your written code for that challenge and need some help, click the Ask for Help button located on the challenge (it looks like a question mark). This button only appears if you have tried to submit an answer at least three times.

The Ask for Help button will create a new topic with all code you have written and include a link to the challenge also. You will still be able to ask any questions in the post before submitting it to the forum.

Thank you.

1 Like

Tell us what’s happening:

Now that you have the list of songs displayed on the screen, it would be nice to sort them in alphabetical order by title.

Start by creating an arrow function called sortSongs.

Hey!
Hit a block with this one…it’s asking for an arrow function and it doesn’t appear I have enough info to write one in the question. Here is my latest effort…

let sortSongs = () => {};

Your code so far

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

/* file: styles.css */

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

let sortSongs = () => {}


// User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:125.0) Gecko/20100101 Firefox/125.0

Challenge Information:

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

Thank you! :wink:
Still getting the hang of asking for help!

It looks like the tests are expecting const but don’t explicitly say that
so that needs to be updated

1 Like

Thank you, ma’am! And I appreciate the topic merge…I’m not sure I am quite there yet to where I would have caught the “const vs let” thing in this scenario. seems rookie mistake, but the devil is ALWAYS in the detail!

technically you didn’t make a mistake.

You can assign an arrow function to a let variable.
But most JS devs will use const in these sitatuions.

but the directions nor hint were clear on that.
So I am creating an issue for that :+1:

1 Like

Thanks for the attentiveness to continued improvements! And thank you for letting me know I was good with the original codebase…thats valuable feedback!