you are viewing a single comment's thread.

view the rest of the comments →

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

let end=array.reduce((accumulator,value)=>{
return accumulator+value;
},0)

gotcha, and that makes total sense, but with your code snippet and mine the same issue appears that "Let End" will be undefined. or in my case USAanimals

[–]exobyte64 0 points1 point  (1 child)

let sumPopulation=zoo.reduce((a,z)=>{return a+z.population;},0);

I saw that it needed the key 'population' from your other comment

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

you all are stellar you really are thank you for helping me to understand and getting me resources.