11. Hash

11.1 key value pair

Hash stores key value pair.

hash =  { "USA" => "Washington D.C.",
          "England" => "London",
          "France" => "Paris" }

In this hash country name is the “key” and the capital of the country is the value.

We can print the contents of a hash using method inspect.