While Loop: While Syntax


var understand = true;

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

Simple question: How is //var understand = true// a condition and not just a value assignment. MY understand is that conditions can be tested, but assignments are just bits of data the computer has a name for.
What am I missing here?


All conditions represent a state of either true or false. Regardless the expression, the yield is always boolean. true is therefore a condition.


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