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.
You only manage to do one-level of nesting (the outer-most layer). You should consider using a stack-based or recursive approach
Explanations from JavaScript Garden
Also look at Kata description more attentively: "We want to create a function, which returns an array of functions".
Not array of integers, but functions. In your code
callbacks.push(handle(i));
is equivalent tocallbacks.push(i);
.Hope it helps.