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.
haha, that's a good one.
How does this work? What does the single pipe do?
This comment is hidden because it contains spoiler information about the solution
Good job not using written methods!
By the way, you can save some code if you init your hash like: hash=Hash.new(0) (Now the default value is 0 for a key not found in your hash)
That way you don't need one of the nested ifs
Example of setting a new default value
hash=Hash.new("It works!")
hash[key_i_made_up] #=>"It works!"
hash #=>{key_i_made_up => "It works!"}