Introduction to 'While' Loops in JS ( While Syntax)


#1

<Below this line, add a link to the EXACT exercise that you are stuck at
https://www.codecademy.com/en/courses/javascript-beginner-en-ASGIv/0/2?curriculum_id=506324b3a7dffd00020bf661


I have no idea what I am supposed to do, despite doing the previous few lessons with greater ease. I am providing the code that was included in the lesson.

Here are the instructions:
Try it yourself—complete the while loop in the editor so it will print out "I'm learning while loops!". Do this by adding the condition between the parentheses—don't change line 5, or you could get an infinite loop!


Replace this line with your code. 
var understand = true;

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


#2

I'm not sure where this 1 came from. Try taking it away. Making it simply.

while(understand)

#3

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