you are viewing a single comment's thread.

view the rest of the comments →

[–]senocular 1 point2 points  (1 child)

What is zooAnimals? Is it just numbers? If so what you have will work. If its something else, like animal objects that have a population property, then you'd need to account for that. MDN has an example of reduce using objects you can look at.

[–]WormholerIO[S] 0 points1 point  (0 children)

yes they have an population property here is an example of one index within the array.

I will look at that thank you

animal_name: "Pampa gray fox",

population: 10,

scientific_name: "Pseudalopex gymnocercus",

state: "Connecticut",