For each item in : for « Statement « Ruby






For each item in



print "Your pizza comes with "

for item in ["pepperoni", "sausage", "olives"]
  print item + " "
end

 








Related examples in the same category

1.general form of the for loop
2.Using the for Loop
3.Nested for loop