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

Tell us what’s happening:

Theres no answer in the help forum for this, isnt this how the properties are supposed to be listed…

Your code so far

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

/* file: styles.css */

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


  playerCards.innerHTML += arr.map((name, position, number, isCaptain, nickname) => {

  })


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

Challenge Information:

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

Hi. These are properties inside the players array. Look how the players array is constructed. Its an array with a series of objects. Think what brackets you need to put around the properties in the parameter here. Look at the example, at what brackets they have around it there. This is also an array.

Hi, sorry I couldn’t quite understand what you meant, could you explain that further

Hi @booleanmethod9

You should unpack all 5 object properties from objects in arr using object destructuring.

With object destructuring you need to use a specific kind of brace.
Have a look at the example code as @a1legalfreelance suggested.

Happy coding

1 Like

i have given it a curly brackets but it still did not work

Hi @rishabhr3007

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 Help button located on the challenge. This button only appears if you have tried to submit an answer at least three times.

The 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.