While Expression
Evaluates the first block-expression
(the loop body) repeatedly until the expression
(the condition) no longer tests as truthy. The condition is evaluated at the beginning of every iteration. If no iterations run and a while-expression-else
is present, the second block-expression
(the else body) is evaluated once.
The whole expression results in one of the following values, in order:
The result of any
break as
expression within the loop body.The result of the loop body, if at least one iteration completes.
The result of the else body, if a
while-expression-else
is present.The nil value.
Last updated