Content deleted Content added
m →Ruby: ed |
→Ruby: ed |
||
Line 829:
<source lang="ruby">
### iterate over keys and values
phonebook.each {|key, value| puts key + " => " + value}
### iterate keys only
phonebook.each_key {|key| puts key}
### iterate values only
phonebook.each_value {|value| puts value}
</source>
|