What does the following code return?
snowy_owl = { "type"=>"Bird", "type" => "Owl", "diet"=>"Carnivore", "life_span"=>"10 years" }
puts snowy_owl
{"type"=>"Owl", "diet"=>"Carnivore", "life_span"=>"10 years"}
Notice that the second key/value pair with the key "type" is included. Every key in a hash must be unique.
http://www.codequizzes.com/ruby/beginner/symbols-array-methods-hashes
Answer
But
putsalways returnsnil. So the answer on the site is incorrect or it should be asking what does it print.