in ,

🧑🏻‍💻 TechAcademy | Iterative processing is possible! How to use times in Ruby [For beginners]

Iterative processing is possible! How to use times in Ruby [For beginners]

You can use the times method to iterate a specified number of times.

Let's take a look at the basic structure.

If you are not familiar with Ruby in the first place, please see the article that explains what Ruby is.

 

This article is based on the contents of TechAcademy's web application online boot camp.

 

 

How to write times

Object .times {| Variable | // Process you want to repeat}

or

Object .time do | Variable |
...

→See more in Tech Tech Magazine