Is the reason for me putting understand = false just to prevent an infinite loop?


#1


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


Replace this line with your code. 



#2

That's exactly the reason why. Something inside the loop has to change the control variable or the loop has no way to terminate.


#3

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