Practice makes perfect


#1


Im not sure what I've done wrong here but I keep getting
Oops, try again. Are you logging 'I'm looping!' to the console three times?

var count = 0;

var loop = function(){
	while(loop < 3){
		console.log ("I'm looping!");
		count++;
	};
};

loop();


#2

Your problem is in your while statement

Instead of loop you need count in there so like this:

while(count < 3){

#3

Thanks that worked. I was stuck on that all morning and just couldn't see it.


#4

Yeah that happens to the best of us! I encounter that "coding block" all the time haha. Happy coding!


#5

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