Comparison of programming languages (associative array): Difference between revisions

Content deleted Content added
Ruby: ed
m Ruby: ed
Line 821:
'J. Random Hacker' => '553-1337'
}
 
<code>phonebook['John Doe']</code>; #produces <codethis -> '555-1212'</code>
</source>
 
<code>phonebook['John Doe']</code> produces <code>'555-1212'</code>
 
Ruby supports hash looping and iteration with the following syntax: