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.
Clever, i did a lot of ifs in my solution. It was simpler haha
nice answer
Go team linebreak
You can indeed use the number parameter. The only advantage to using i is that it is easier to read than (number - 1) :)
Why create the additional variable
i
? There's nothing wrong with modifying thenumber
parameter (which is a copy, and won't affect anything on the caller's side).