Okay, so in the example it says there are two ways to loop.

...

numbers = [1, 2, 3, 4, 5]

# one way to loop

numbers.each { |item| puts item }

# another way to loop

numbers.each do |item|

puts item

end

...

The lesson then asks us to:

Use the .each method on the odds array to print out double the value of each item of the array. In other words, multiply each item by 2.

I understand how to write the code for the second example (# another way to loop) in this exercise.

...

odds = [1,3,5,7,9]

odds.each do |x|

x *= 2

print "#{x}"

end

...

But I don't understand if it is possible, or how to make the first example ( # one way to loop) work.

...

odds = [1,3,5,7,9]

odds.each { |x| print "#{x}" }

...

I have tried:

odds.each { |x| x *= 2 print "#{x}" }

and

odds.each { |x| print "#{x}" } x *=2

but neither work. where do you put in the bit to make it multiply, and how do you write it for the first example of the loop (if it's even possible)?