The while statement creates a loop consisting of a block of statements
that is executed if the expression evaluated is true.
The following example simply counts 1 thru 10 by incrementing a counter by 1
each time for as long as the counter is less than 11:
var i = 0;
document.write(i + "<BR>");