January 2024
Intermediate to advanced
718 pages
20h 15m
English
Hashes (sometimes known as associative arrays, maps, or dictionaries) are similar to arrays in that they are indexed collections of object references. But, while you index arrays with integers, you index a hash with objects of any type, most often symbols and strings but also regular expressions or anything else in Ruby. When you store a value in a hash, you actually supply two objects: the index, which is called the key, and the value, or entry, to be stored with that key. You can subsequently retrieve the entry by indexing the hash with the same key value that you used to store it.
|
Why Are They Called Hashes? | |
|---|---|
|
|
The data structure that ... |
Read now
Unlock full access