solved#50
Conversation
There was a problem hiding this comment.
Iteration 1
Your solution looks good. For naming conventions, parameters names should always be lower-cased. Also you can use a parameter name that indicates which data should be expected from the parameter (i.e: pokemons).
Iteration 2
Your solution is wrong, you were supposed to return the name of the shortest pokemon. You need to look at the property "height" of each pokemon, compare them to each other and return the name of the shortest one.
Iteration 3
Your solution works, you could have also used .reduce to accumulate the candy_count properties. Your variable result would likely work as well without multiplying and dividing by 100. You could have used the following formula as well let result = Number(candyAvg.toFixed(2))
Iteration 4
Your solution is good. Nothing to add.
Iteration 5
You were asked to return only the names of the pokemons. You should have used .map() to extract the names then returned the array.
Iteration 6
Your solution is good. Nothing to add.
Iteration 7
Your solution is good. Nothing to add.
|
Thanks for the feedback. In this lab, I had to copy data array to my working JS. I wonder if there is way to refer an array from another JS file. |
No description provided.