16.Iterating Over a Hash


Whats wrong with my code?
lunch_order = {
“Ryan” => “wonton soup”,
“Eric” => “hamburger”,
“Jimmy” => “sandwich”,
“Sasha” => “salad”,
“Cole” => “taco”

lunch_order.each do|name,order|
puts " #{order}"


Maybe nothing. Without context we have nothing to go by. Please post a link to the exercise.


The problem is that you have a blank space in this line

puts " #{order}"

The line of code should go this

puts "#{order}"


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.