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.
Great, clean solution!
Use single quote.
I think that since 2 items are requested, an error must be raised
head.to_s is required as head could be nil; otherwise, + operation will fail
:D
very clever. but why isn't this best practice too?
Love it. Tho, no need to convert
head
to string explicitly.Like this one, very dynamic
This kata is broken. The last test should produce google, not gmail...
Boo! indeed, way too little tests
What if the age array is empty? If you use hard indices you will get [nil,nil] as a result, where an empty array would be preferable. I suggest adding a case for this :)
It should prevent a division by 0 error if the array is empty!