What to put as a condition


#1


https://www.codecademy.com/en/courses/javascript-beginner-en-ASGIv/0/2?curriculum_id=506324b3a7dffd00020bf661


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;
}


#2

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.


#3

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