Hash

A hash in Ruby is used for indices other than the classic numerical values.

Here is a couple of example hashes grades = { "Jane Doe" => 10, "Jim Doe" => 6 }

options = { :font_size => 10, :font_family => "Arial" }

Using a hash could look like this options[:font_size] # => 10