The variable storing the hash is dictionary, and it contains two entries : Key value « Hash « Ruby






The variable storing the hash is dictionary, and it contains two entries


dictionary = { 'cat' => 'feline animal', 'dog' => 'canine animal' }


puts dictionary.size

 








Related examples in the same category

1.objects within a hash are given a key that points to them.