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