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

Tell us what’s happening:

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. I am getting error in this , please help me clear this

Your code so far

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

/* file: styles.css */

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

  arr.map(function(){
    
  })


// User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36

Challenge Information:

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

Hello, an empty call back should be parenthese and an arrow => but no keyword.

Whenever you see a request for an empty callback function in fCC, they mean write an arrow function.

It does not require an arrow function. What your code is missing is

Then, use the addition assignment += operator to assign the new array to playerCards.innerHTML .


As an aside, that should never be true. If the requirement is for an arrow function, it should be stated in the requirements.

@lasjorg, does this mean you can write a call back with (function(){ })?

Yes, it should pass with a normal callback. It does for me.