I am trying to update my hash's values after subtracting the values by three. For example,
extinct_animals = {
"Passenger Pigeon" => 1914,
"Tasmanian Tiger" => 1936,
"Eastern Hare Wallaby" => 1890,
"Dodo" => 1662,
"Pyrenean Ibex" => 2000,
"West African Black Rhinoceros" => 2011,
"Laysan Crake" => 1923
}
I have this code, which sets the values to subtract three:
extinct_animals.each {|animal, year| puts year - 3}
and the output:
1911
1933
1887
1659
1920
How do I return the entire hash with the keys and new values?