+ 3

Question 4 under hashes & symbols

wat are hashes use for

7th Nov 2016, 6:12 PM
Akyem Stephen
Akyem Stephen - avatar
2 ответов
+ 3
Hashes are MUCH faster than arrays at grabbing a specific variable. Hashes are typically unordered. Imagine 2 file cabinets, one is an array and one is a hash. Inside the array cabinet, all the folders are unmarked so, if you want to find a folder, you have to know where you put it OR go through ALL of them until you find it. Inside the hash cabinet, all the folders have tabs with labels (or "keys"). This way, you want to find something, you just have to look for the label and you're done. UPDATE: In Ruby, Hashes are ordered by default.
14th Nov 2016, 7:15 PM
Zachary Laborde
Zachary Laborde - avatar
0
to get the header file contents
7th Nov 2016, 8:24 PM
LOGMAN TARIG