Why is it printing FALSE



The code is printing an additional false after the expected output, I haven’t given any console.log() statement.

**My Code**
var understand = true;

while( understand===true ){
	console.log("I'm learning while loops!");
	understand = false;


It is normal for the console to respond with the flushed contents of its buffer, which in this case is the last assignment made,

understand = false;

Swap the two lines so the assignment is done before the logging out.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.