Learn Modern JavaScript Methods by Building Football Team Cards - Step 25

Tell us what’s happening:

How to solve this step? is unclear, Im trying to

Your code so far

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

/* file: styles.css */

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

  function(card) {

// User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:124.0) Gecko/20100101 Firefox/124.0

Challenge Information:

Learn Modern JavaScript Methods by Building Football Team Cards - Step 25

Please talk to us about how the instructions are confusing. Thanks

The instructions asking you this:

Inside the setPlayerCards function, start by adding the map method to arr that will take in an empty callback function. Then, use the addition assignment += operator to assign the new array to playerCards.innerHTML.

You didn’t have a callback function.

The map method is supposed to take an empty callback function as its argument.

The function (card) {
playerCards.innerHTML += card

is not an empty callback function, because it takes a parameter “card” and there are executable statements inside your function.

I also had problems with this step, but my question is a different one.

My previous code didn’t pass:

playerCards.innerHTML = arr.map (function( ) { });

I eventually figured it out by passing in another form of empty callback functions.
(To not simply give out the answer, I won’t post it here)

What I do not understand is:
There seems to be two forms of empty callback functions.
Why is the empty callback function as provided above not acceptable in this step?

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.