Team stats, exercise help!

Hello :slight_smile:
I’m trying to list all the players in the exercise “Team Stats”, and it kinda works but i’m getting a line that says “undefined”. And i cant figure out why? Where does that come from?

1 Like

here:

console.log(team.listPlayers());

listPlayers() doesn’t return anything, yet you attempt to log the return value.

1 Like

Hey !! :smiling_face_with_three_hearts: :smiling_face_with_three_hearts: :smiling_face_with_three_hearts: :smiling_face_with_three_hearts:

Try to call the listPlayer() methode on team object , and check the results :

team.listPlayers();
1 Like

Thanks, that fixed it :slight_smile:

1 Like

You’re welcome bro ! :+1: :+1: :+1:

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.