16 how to print value?


#1

lunch_order = {
"Ryan" => "wonton soup",
"Eric" => "hamburger",
"Jimmy" => "sandwich",
"Sasha" => "salad",
"Cole" => "taco"
}

lunch_order.each { |element| puts element }


#2

having the same issue as well... but I decided to go a different route

heres what I put down...

lunch_order = {
"Ryan" => "wonton soup",
"Eric" => "hamburger",
"Jimmy" => "sandwich",
"Sasha" => "salad",
"Cole" => "taco"
}
lunch_order.each do | key, value |
puts value
end


#3

try it!!

lunch_order = {
"Ryan" => "wonton soup",
"Eric" => "hamburger",
"Jimmy" => "sandwich",
"Sasha" => "salad",
"Cole" => "taco"
}

lunch_order.each do |cus, val|
puts "#{val}"
end