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

Tell us what’s happening: My code is not working. I followed the instructions.

Your code so far

const songsHTML = array.map(song => {
});
};

WARNING

The challenge seed code and/or your solution exceeded the maximum length we can port over from the challenge.

You will need to take an additional step here so the code you wrote presents in an easy to read format.

Please copy/paste all the editor code showing in the challenge from where you just linked.

Replace these two sentences with your copied code.
Please leave the ``` line above and the ``` line below,
because they allow your code to properly format in the post.

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.2.1 Safari/605.1.15

Challenge Information:

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

You do not need that arrow function.

const songsHTML = array.map();

};
not working

It should work, post the other sections of your JS code, maybe the problem lies there.

Later when you call the renderSongs function, you’ll pass in the songs array inside the userData object. When you do, the function will loop through the array and build HTML for all the songs.

To do this, you’ll use the map() method, which you’ll learn more about in the following steps.

For now, use const to declare a variable named songsHTML and assign it array.map().

my code:

const songsHTML = array.map();

};

this code is below the const renderSongs = (array) => {

note: even if i remove the () after the map, the code doesn’t work.