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

Tell us what’s happening:

I am using an arrow function to sort the songs like this

const sortSongs = (songs) => songs.sort()

but I keep getting this error

Your sortSongs function should use arrow function syntax. when I try to run it

Thank you for your help

Your code so far

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

/* file: styles.css */

/* file: script.js */
// User Editable Region
const sortSongs = (songs) => songs.sort();
// User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (X11; CrOS x86_64 14541.0.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/156.0.0.0 Safari/537.36

Challenge Information:

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

GitHub Link: freeCodeCamp/curriculum/challenges/english/blocks/learn-basic-string-and-array-methods-by-building-a-music-player/65c64fe6c770a22db893e931.md at main · freeCodeCamp/freeCodeCamp · GitHub

Welcome back to the forum @moore.joel

You are not asked to include a parameter for this step.

Happy coding

It works Thank you so much