Skip to main content

repeat

Repeats everything inside its body a given amount of times.

Syntax

repeat $number with $iter

Example

# Repeat a fixed number of times.
repeat 10
Print "hi"
end

# The count can be an expression or variable.
repeat {Random 1 10 int}
Print "hi"
end

# Bind the current 1-based iteration number.
repeat 10 with $iter
Print "current iteration: {$iter}"
end

# Use break to leave the loop or continue to skip to its next iteration.