Q:

formulation of do loop

I am completing a book called  "DOM Scripting - Web Design with JavaScript and the Document Object Model" written by Jeremy Keith.
Here is the 'do...while' example given:
var count = 1;
do {
    console.log(count);
    count++;
} while (count < 11);

In the book he has stated that if we look at our do...while loop example we can be formulate it in full like this:
initialize;
while (condition) {
    statements;
    increment;
}

Surely this is in fact a mistake and this is actually the formulation of a while loop and not a do...while loop.
I have also checked the Errata to see if this was an error in the book but there is no mention of it.
Am I correct in saying this is the formulation of a while loop and not a do...while loop? Is there some authoritative ECMAScript documentation I can consult?

A:

In the book that you mentioned above , do-while has been described like this :
    As with the if statement, it is possible that the statements contained within the curly
    braces of a while loop may never be executed. If the condition evaluates as false on the
    first loop, then the code won’t be executed even once.
    There are times when you will want the code contained within a loop to be executed at
    least once. In this case, it’s best to use a do loop. This is the syntax for a do loop:
    do {
    statements;
    } while (condition);
    This is very similar to the syntax for a regular while loop, but with a subtle difference. Even
    if the condition evaluates as false on the very first loop, the statements contained within
    the curly braces will still be executed once.

So it becomes clear after reading this section that the author never says that do-while and while are the same. What he says is that, whatever you are doing using while, you can do the  same using do-while. However, in a while, if condition evaluates to false during the first iteration itself, it will not even enter the loop. But in do-while, since iteration  in the syntax is specified later, so it will enter the loop at least once. That's pretty much what he means.

