Introduction to "While" Loops in JS #5. Practice makes Perfect


#1


Introduction to "While" Loops in JS #5. Practice makes Perfect



Replace this line with your code. 
//Remember to set your condition outside the loop!
var count = 0;

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

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



What am I doing wrong? I am getting the output but  what is wrong????????


#2

HI just remove the parameter count to the function loop then just call it like that

var loop = function() {
    ...
};

loop();

#3

Still not working


#4

Thanks Figured it out


#5

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