The do...while statement executes one or more statements at least once, checking that a certain condition is met each time before repeating. If that condition is not met, then control moves to the statement immediately after the loop.
var i = 0;
do
{
document.write(i + ".<BR>");
i+=2;
}
while(i<20);
This example counts up in twos for as long as the number is less than 20.