haxe Loops While


Example

While-loops execute a body expression as long as the loop condition evaluates to true.

A while-loop which logs numbers in range 9 to 0 (inclusive) can be written as follows:

var i = 10;
while (i-- > 0) {
    trace(i);
}

Try the example on try.haxe.org.

References