What do I do?


#1


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


I have no idea what i'm supposed to be doing and it sad because this is just the introduction, but no matter what condition I put in it either doesn't work or it's a infinite loop. Can someone explain, please?


var understand = true;

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


#2

you have to give your while loop a condition:

while(/* set condition while loop here */)

#3

I'm in the same situation. I've no idea what sort of condition I need to put in there. Maybe I'm lacking imagination...


#4

As long as the condition evaluates to true, the loop will continue to run. As soon as it's false, it'll stop

understand is true, then inside the loop it is set to false. Maybe you can use this to your advantage?


#5

I was just reading this, because I too was experiencing the same issue. stetim94 if I replied with I (understand) Would I understand the lesson?


#6

if you understand that no comparison is done when your condition is (understand), but that understand is evaluated if its true or false, then yes, you understand :slight_smile:


#7

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