RosettaCodeData/Task/Associative-array-Iteration/Ruby/associative-array-iteration...

12 lines
177 B
Ruby

for key, value in myDict
puts "key = #{key}, value = #{value}"
end
for key in myDict.keys
puts "key = #{key}"
end
for value in myDict.values
puts "value = #{value}"
end