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're making a function that will be called a number of times. All your code should (in 99% of cases) be contained inside this function. Any global variables retain state between calls.
You shouldn't use input on Codewars in general. A number will be fed to your function in the tests. Just assume that function will receive the necessary parameters to execute without having the user entering any kind of number. Hope this helps! If you reset your solution, you should use "n" as the number who will be necessary to code your solution.