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.
Which language?
Really, I would be spending so much time (in doubting myself) if it was not Firefox's Scratchpad.
So all the tests for this kata are broken.
Spent forever trying to figure out what was wrong with my code when it worked in a different code editor.
Yet somehow my submission worked.
This kata setup is pretty awful for beginnings when the actual coding itself isn't really that hard.
It returns a substring of length "size" that starts at index 0 of the string in the brackets.
See the second case in the Ruby String object documentation.
This comment is hidden because it contains spoiler information about the solution
I'm a little confused how this works.
What does the
[0,size]
part do? It looks like an array, but the output isn't an array.Wow...this is so clever. I didn't even think about it like this!