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.
Genius!
This comment is hidden because it contains spoiler information about the solution
I think so!
dope
I like this solution the most. Very easy to read!
Sorry but i dont get it, can u explain how it works?
Which is IMO the only sensible thing to do, considering that the return type isn't an optional.
What happens if you try to do
switchItUp(10)
...crash!I agree - so clever!
I think it's clearer.
My fav solution!
I guess if you were to use this in a browser environment without a transpiler you might want to use the array notation.
Exactly!
What does the [number] at the end do? My guess is that it takes the input Int as an index for the array, is that correct?
This comment is hidden because it contains spoiler information about the solution