A hash contains key and value.
If the key is not found, then hash returns nil.
Let's see it in action:
As we can see, the hash does not
have a key called age
and
this is why, the hash returned nil
.
That's what hash does by default.
However, we can tell hash
to return some other default value.
This time we got 0.
This is because, we
changed the default
value of the hash to zero.