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.
Very good!
"array" in the reduce statement is the starting value. If you were summing array elements with the reduce statement this value would (usually) be 0.
The 'a' equates to "array" so the effect of each iteration is to replace (return) array with the next level down in the array, as you progress through each one of the 'indexes' values.
i tried this one on http://pythontutor.com, but that gave me no idea how does it work.
where does it get arguments "a" and "i"? why it has an 'array' at the end of inner return? what it does?
documentation and articles gave me no clues about using .reduce() except summing array elements