RosettaCodeData/Task/Associative-array-Creation/Ruby/associative-array-creation-...

5 lines
74 B
Ruby

hash = {}
hash[666] = 'devil'
hash[777] # => nil
hash[666] # => 'devil'