Tell us what’s happening:
The callback function of your map()
method should use arrow function syntax.
Your code so far
const songsHTML = array.map((song) => song);
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36 Edg/122.0.0.0
Challenge Information:
Learn Basic String and Array Methods by Building a Music Player - Step 13
Ya, the hint you are getting isn’t helping. You are obviously using the arrow syntax. The real issue is the following:
“…and have an empty body”
The body of your callback function isn’t empty.
1 Like
lasjorg
3
Also, to have an empty function body it must have a block body.
MDN: Function body
const songs = ;
const songsHTML = array.map((song) => songs);
I don’t understand?
Look at the example code in the MDN link.
A block body is {}
2 Likes
system
Closed
6
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.