5. Please help with "Practice Makes Perfect"


#1


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


I'm creating an infinite loop and I'm trying not to! Any insight into what I'm doing wrong? Additionally, in the text it says, create the condition outside of the function / loop. In general, is creating a condition the same as saying, use an operator?


 
//Remember to set your condition outside the loop!
var count = 0

var loop = function(){
	while(count < 3){
		//Your code goes here!
		console.log("I'm looping!");
	}
};

loop(count);


#2

After console.log("I'm looping!");
Place : count++

Basically you didn't tell what to do, and it does an infinite loop.


#3

Thanks, webwhiz! :grinning:


#4

//Remember to set your condition outside the loop!
int count=0;

var loop = function(){

while(count<3)
{


	console.log("I'm looping!");
            count++;
}

};

loop();

I am doing this.but still why error?