Using the for Loop : for « Statement « Ruby






Using the for Loop



for value in 1..10
  puts "This is iteration " + value.to_s
end

 








Related examples in the same category

1.general form of the for loop
2.For each item in
3.Nested for loop