In the book "Beginning JavaScript" by Jeremy McPeak and Paul Wilton there's a do-while loop example.
var userAge;
do {
userAge = prompt("Please enter your age","")
} while (isNaN(userAge) == true);
and below the author repeats one more time:
userAge = prompt ("Please enter your age","")
There's no semicolon at the end of the statement inside the do {} block. As far as I can remember the author stated that it's considered best to always end any statement with a semicolon although it's not a must in most cases.
Was the omission of ; intentional? It seems so considering that in both the 4th and 5th editions there's no semicolon. And there's also a repetition of that line below which doesn't contain a semicolon either. Of course, one might say that it's not even a mistake. What I want to understand is whether the omission of a semicolon is more likely to be a typo or (which is worse) rather was done intentionally. If the latter is true, isn't that a sign of inconsistency?