For iterator

suggest change

This iterates from 4 to 13 (inclusive).

for i in 4..13
    puts "this is #{i}.th number"
end

We can also iterate over arrays using for

names = ['Siva', 'Charan', 'Naresh', 'Manish']

for name in names
    puts name
end

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents