The For Statement
Although explicit looping over an array is not often needed, it can be achieved with the
for statement:
for variable in expression
statements
end
The expression must evaluate to an array. The variable takes on successive elements of the array on each iteration of the loop. Assignment to the loop variable is legal, but has an effect only for the remainder of that iteration. It does not alter the array.
Related information