While Loop declaring var


Why didn't i have to declare a "var understand" in this exercise?

understand = true;

	console.log("I'm learning while loops!");
	//Change the value of 'understand' here!
	understand = false;


why would we? variable can be declared without the var keyword.


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