3. do while Statement
The do while statement is another
looping JavaScript statement, similar to the while statement. The do while statement
executes a statement or statements once, then repeats the execution as long as
it evaluates the true value of a given conditional expression.
The syntax is as follows for the do while statement:
Far from the simpler while statement, the statements in a do while statement are always executed at least once, before the conditional expression is tested the first time.
The following do while statement runs once before the count variable is evaluated by the conditional expression. Thus, a single line reads "The count equals 2." prints. The count variable is equal to 2 when the conditional count < 2 is evaluated. This allows a false value to return to the conditional expression, and the do while statement ends.
do {
count++;

In the next example, the code
prompts the user for a multiplier, and prints the multiples of 1 to 50 using a
do while loop.
var multiplier = prompt("Enter a multiplier: ");
</script>