Skip to content

solved#50

Open
tsekamaru wants to merge 1 commit into
ManishPoduval:masterfrom
tsekamaru:master
Open

solved#50
tsekamaru wants to merge 1 commit into
ManishPoduval:masterfrom
tsekamaru:master

Conversation

@tsekamaru

Copy link
Copy Markdown

No description provided.

@LloydC LloydC left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@tsekamaru

Copy link
Copy Markdown
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants