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

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

and how are you returning the string?

because in the seed code the template literal is returned, if you don’t have that the code is never going to pass. reset the step and try again

Also, the space should be between "(Captain)" and ${name} not inside the "(Captain)" string.

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

<div class="player-card">

<h2>${name}${isCaptain? "(Captain)":""}</h2> </div>

} );

is this correct

where are the backticks of the template literal? also you need to return the template literal