Because array indices start from 0.
As the instructions said that name is a property of the object 'Players', Also we can't target the name of the player unless we use the Key Value which is the name: the structure is like that : Players[{name: "a"}, {name: "b"} ... {name: "z}];
There is no precision for the output of 2 digits implemented
Please do not forget to use spoiler tag next time.
As for your question: I am by not means expert here but I'd say it is indeed a common practice.
This comment is hidden because it contains spoiler information about the solution
Good!!!!
Every player (element in players array) is constructed into an object:
class Player { constructor(name) { this.name = name; } } let players = ex_names.map((n) => new Player(n));
.name allows you to access and return the property value. If it would not be there you would return the whole object. For example Player { name: 'a' }
.name
Player { name: 'a' }
Generally when you end, you need to a hero at recursive functions.
very cool!
What is the purpose of the first empty string in the terniary operator? Always find it difficult to work through recursive logic. Very clever 👏.
i can't understand why are you using name
No sample tests.
why?
Not an issue. Your solution is wrong.
Loading collection data...
Because array indices start from 0.
As the instructions said that name is a property of the object 'Players', Also we can't target the name of the player unless we use the Key Value which is the name: the structure is like that :
Players[{name: "a"}, {name: "b"} ... {name: "z}];
There is no precision for the output of 2 digits implemented
Please do not forget to use spoiler tag next time.
As for your question: I am by not means expert here but I'd say it is indeed a common practice.
This comment is hidden because it contains spoiler information about the solution
Good!!!!
This comment is hidden because it contains spoiler information about the solution
Every player (element in players array) is constructed into an object:
.name
allows you to access and return the property value. If it would not be there you would return the whole object. For examplePlayer { name: 'a' }
Generally when you end, you need to a hero at recursive functions.
very cool!
What is the purpose of the first empty string in the terniary operator? Always find it difficult to work through recursive logic. Very clever 👏.
i can't understand why are you using name
No sample tests.
why?
Not an issue. Your solution is wrong.
Loading more items...