Just wonder why the output by the while loop contains two "10".
var j=1;
while( j < 11){
console.log(j);
j ++;
}
The output looks like below 1 2 3 4 5 6 7 8 9 10 10
Just mention that do-while loop could produce similar problems, which helps to understand the nature of the last output.
var k=0
do{
console.log("do-while");
k++;
}while(k<10)
The output is like that: do-while do-while do-while do-while do-while do-while do-while do-while do-while do-while 9