forloops offer a quick and easy way to do something repeatedly. They're handy, if you want to run the same code over and over again, each time with a different value. You can think of a loop as a computerized version of the game where you tell someone to take X steps in one direction then Y steps in another; for example, the idea "Go five steps to the east" could be expressed this way as a loop:
forlooping construct and the loop can be written in different ways:
inoperator for array/map
Note: The value is read-only.
forloop with a condition
forloop can also be infinite