Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Ruby Hashes Example

DZone's Guide to

Ruby Hashes Example

· ·
Free Resource
This piece of code demonstrate ruby hash iterating:


#!/usr/bin/ruby
 
address = {
	"First name" => "First",
	"Last name"  => "Last",
}

address.each do |key, value| 
	puts key + " - " + value 
end

Topics:

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}