What to put as a condition



I can't figure out what to put as a condition. I thought if I put understand = true, it should print the message to the console and then make understand = false, thereby stopping the loop. But what I've done is create an infinite loop and crash my browser.

var understand = true;

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


Your problem is similar to this one:

currently short in time but if you have a question feel free to ask, I'll elaborate on this later if necessary.


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