Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
It should work, since addition is commutative. Maybe you missed something else?
does anyone can explain me why "(curr * curr) + prev" doesn't work? it was my first attempt
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/Reduce
Here is an step-by-step explanation:
https://medium.com/@trent.dang/javascript-array-reduce-step-by-step-explained-part-1-17926f8e71d5
Do you have a good recource to teach in depth how the reduce method works?
I find the documentation to be a little vague and difficult to understand.