The "for" statement is used to iterate through all the elements of the specified object. The object must be of a type that supports indexing such as arr, map, str, buf, set, range of integers. For each entry for assigns iteration values to corresponding iteration variables if present and then executes the block. You must specify the name of the variable for iteration values and, optionally, the name of the variable for the index value.
If you want to iterate through a range of integer numbers, use the syntax from..to as the object, where from and to are values of the integer type. This will iterate through all the numbers between from and to, including the extreme values. The initial value can be greater than the final value, in this case, the iteration value will be decreased.