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

Tell us what’s happening:

Step 23
The next step is to create a new array that will be responsible for adding the player card information to the page.

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.

Remember that the innerHTML property gets, or in this case, sets the HTML markup for the playerCards element. not able to understand the instruction arrw conv

Your code so far

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

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

 playerCards.innerHTML += setPlayerCards;


// User Editable Region
/* file: styles.css */

Your browser information:

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

Challenge Information:

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

hi there,

what is your question?

Hi @fortechaditya

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.

'Assign to' means playerCards.innerHTML goes on the left hand side of the equals sign.

On the right hand side of the equals assign, add the .map() method to arr

Happy coding

I think there is only one issue with the instructions which is to say they freecodecamp should tell us why we are doing that.

Thank you for taking out the time to reply. I got answer after reading your message.

1 Like