Type Statement
Format
{do (
Processing
} ) while (condition)
Commentary
The do...while loop is a variant of the while loop. This loop will always execute a block of code ONCE, and then it will repeat the loop as long as the specified condition is true. This loop will always be executed at least once, even if the condition is false, because the code is executed before the condition is tested.
Sample code - QC 2 JavaScript
n = 0;
do {
n ++;
outputs [0] = n;
} while (n <3);
Sample code - QC 3 JavaScript
function (__number outputNumber) main ()
{
var result = new Object();
n = 0;
do
{
n++;
}
while (n<3);
result.outputNumber = n;
return result;
}