Tell us what’s happening:
I tried a lot by returning the string.but it doesnt work
Your code so far
<!-- file: index.html -->
/* file: script.js */
// User Editable Region
/* file: script.js */
// User Editable Region
playerCards.innerHTML += arr.map(
({ name, position, number, isCaptain, nickname }) => {
`
<div class="player-card">
<h2>${isCaptain ? "(Captain) " : ""}${name}</h2>
</div>
`;
}
);
// User Editable Region
/* file: styles.css */
Your browser information:
User Agent is: Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Mobile Safari/537.36
Challenge Information:
Learn Modern JavaScript Methods by Building Football Team Cards - Step 27