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

Tell us what’s happening:

Sorry, your code does not pass. Try again.

Your filter() callback should implicitly return the result of checking if player.position is “forward”.
i dont understand what it wants me to return

Your code so far

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

/* file: styles.css */

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

    case "forward":
    setPlayerCards(players.filter((player) => {
      if (player.position === "forward") {
        return;
      }));
    break;



// 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 41

You almost have the solution. But you need to implicitly return the result, that means using just one line arrow function without using “return”. Look at your nickname case and you need to do something similar to that.
Happy coding!!

1 Like

thank you, i solved it :handshake:

1 Like