B
This commit is contained in:
parent
e5e8880e41
commit
518da4a923
1019 changed files with 15877 additions and 0 deletions
|
|
@ -0,0 +1,16 @@
|
|||
h = [ hello: 1 world: 2 :! : 3]
|
||||
|
||||
#Iterate over key, value pairs
|
||||
h.each { k, v |
|
||||
p "Key: #{k} Value: #{v}"
|
||||
}
|
||||
|
||||
#Iterate over keys
|
||||
h.each_key { k |
|
||||
p "Key: #{k}"
|
||||
}
|
||||
|
||||
#Iterate over values
|
||||
h.each_value { v |
|
||||
p "Value: #{v}"
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue