2. while syntax - just dont know what to do



hey. just basically dont understand what im required to do? it says its should simpler and that i just need to 'Do this by adding the condition between the parentheses—don't change line 5, or you could get an infinite loop!'
what do i have to do exactly? what condition? no one else seems to be having this problem

var understand = true;

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


your while loop has a condition:


well, not yet, the brackets are still empty. with condition it would like this:


condition is just a placeholder word, you can put understand inside:


since understand is true, the loop will run, then in the loop understand is set to false, the loop won't run again (don't remove the understand = false; it will cause an infinity loop


Hi the condition should be understand

    // Do something!


thanks guys i just was finding it hard to think about but i totally get it now maybe i just needed to step away from it for a while as well


I added while(understand = true) why did this cause an endless loop?


because you assign a value of true to your understand variable, which means understand will always be true, causing a infinity loop, you want to compare understand with true, use two equal signs