2. While syntax, My code goes through but I don't know if i did it right



Hi, my code goes through the console, but I don't think it is right. I'm pretty sure it is supposed to print out "I'm learning while loops!
But it actually prints out "I'm learning while loops!
false" This could be right but I'm not sure. Thanks!

var understand = true;

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


Hi you dont need to put understand equal to true, so remove it


That is just something the console does, neither false or true should normally be printed.

Now it is false, because that is the value of understand in the end. But nothing to worry about.

@wizmarco, i agree, but both methods work, did you read the question?


Ok, thanks :slight_smile: