While loop wont work


#1

var count = 0;
var loop = function(){

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

};

loop();

I want the code to loop three times but it crashes everytime I run it. What's wrong with it?


Replace this line with your code.


#2

count++ is shorthand for count = count + 1, so currently you do:

count = count = count + 1

not sure how that will work/pan out, but as you seem to experience, not very well


#3

It worked -
Thanks, man!


#4