var bar=3;
while (bar>1) {
  console.log("ok"); 
  bar--; 
}
I am doing this course at codecademy, when I run the code this shows up in the console..
"ok"
"ok"
2
Why does it show a number?
When I insert additional code after the code, it doesn't. e.g.
var bar=3;
while (bar>1) {
    console.log("ok"); 
    bar--; 
}
var foo;
for (foo = 10; foo <12 ; foo++){ 
     console.log( "ok" ); 
}
I am an absolute beginner at this.
 
    