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.
objects in js are dictionaries, and functions are objects theirselves, so you can call any function that is part of an object with a dictionary key.
This comment is hidden because it contains spoiler information about the solution
The function here is just for grouping and doesn't add any special method classes that do work. You can easily copy the function code and put it exactly where the function call is and it will work exaclty the same.
Not as true to the specs as it could to be, and not as efficient as it should be, but I wouldn't call it 'cheating'
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
That's how recursion works, check your code here: http://pythontutor.com/javascript.html#mode=edit
Have you tried to run your solution in your local IDE and see how it works?