More on flow control why does "false" print in console


#1

This simple loop is correct, but I am wondering why "false" prints out in the console after "Confusing loops."

`// Write your loop below!
var condition=true;
while(condition){
console.log("Confusing loops.");
condition = false;
}

`Thanks.


#2

The last instruction carried out by the program is this assignment so it is logged at completion. This is normal behavior of the console. Move the statement up one line so console.log() is the last instruction and it won't print.


#3

Thanks I appreciate your timely response.