10. Range

10.1 Use range and print each value

Let’s say that I want a range of numbers from 1 to 20. In Ruby we can get range of numbers by using (1..20).

Just like an array, a range also supports do end which we can use to print each value.