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

Tell us what’s happening:

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. Hi Guys, can anyone help me to understand what and why we are doing this along with how;

Your code so far

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

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

  const newArray = arr.map(() => {});  
  playerCards.innerHTMl += newArray;

// 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/128.0.0.0 Safari/537.36

Challenge Information:

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

This part of your code is good.

arr.map(() => {});

Were you asked to create a variable called newArray?

You should have 1 line of code.