I need help on this whole course

I tried everything I learned from there but I couldn’t. SO can someone please help me with this code.

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

What’s the error you’re receiving? :slight_smile:

Oops, try again. It looks like you didn’t print anything to the console.

Well, you didn’t print anything :smile:
What are the instructions?

  1. Iterate through .each key/value pair in lunch_order.

  2. Please puts out the value of each pair (just the value, not the key).

Jacobs are you here.

Okay, so given those instructions how can you go through each item and print the value?

You have, at this point, probably been taught how to use loops, right?

Yes I did. I know how to use loops

OK, so what it wants you to do is loop through lunch_order and print out everyone’s order.

For example, the output should look like:

wonton soup
hamburger

what should I do? there are tons of loops.

There are no loops in the code you gave.

However, the instructions suggest you to use a foreach loop (.each).

Just read through the tutorial and you will get it.

Do you still need help on Date Structures 16 ?

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

lunch_order.each { |x,y| puts y }