pizza = {
"style" => "New York",
"slices" => 8,
"diameter" => "15 inches",
"toppings" => ["mushrooms", "greenpeppers"],
"is_tasty" => true
}
pizza.each do |k, v|
puts k
puts v
puts "------"
end
pizza.each_key do |things|
puts things
end
pizza.each_value do |val|
puts val
end
--------------------------------------
#=>
style
New York
------
slices
8
------
diameter
15 inches
------
toppings
mushrooms
greenpeppers
------
is_tasty
true
------
style
slices
diameter
toppings
is_tasty
New York
8
15 inches
mushrooms
greenpeppers
true