Ruby upto for looping

Numeric variable on ruby have upto method that we can use to do looping. Normally looping is done by using while or for syntax. Ruby can do differently.

Example above we loop from 10 to 15. Its simpler right.

Leave a Reply

Your email address will not be published. Required fields are marked *