For complex collections, the hash data structure is a powerful tool in Ruby programs. Hashes are key/value-based and let you access data elements with more than a pure index, such as with arrays. Though we've briefly touched on hashes in the previous lessons, I want to give you a firm understanding of what hashes are and how they can be used.
Essentially, a hash is a key/value pair collection. In an array, each element is a single item such as a number or word whereas in a hash, each element has two items, and includes a value and a key associated with it.
Sometimes, the value itself can be another collection like an array or a hash.