without a default value
dog_breeds = {“corgi”=>“short and sweet”, “labrador”=>“labradorable”}
dog_breeds[“Australian cattle dog”] #=> nil
with a default value
default_cuties = Hash.new(“cutie”)
dog_breeds[“vizsla”] #=> “cutie”
accessing a nonexistent key doesn’t alter the hash
dog_breeds #=> {}
default_cuties is a new variable that is otherwise referenced no where. I am sure I will figure out how to use Hash.new on my own but this tutorial does not teach it. If you run this code in your terminal you will see that the example code returns nil not cutie as the tutorial says it will.