Ruby - Introduction Range Iterating

Introduction

You may use a range to iterate from a start value to an end value.

For example, here is one way of printing all the numbers from 1 to 10:

Demo

for i in (1..10) do 
     puts( i ) 
end

Result

Related Topic