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.
Can someone explain this code?
This comment is hidden because it contains spoiler information about the solution
Doubt!! Consider the number 89.
for "8" the initial value added is 0, as initial value is specified in reduce method.
So for "9" , the accumulator(8) will be added to 9.
Is 0 used as initial value for all indexes in array?