Can someone help me with this?


#1

var count=0;

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

loop();

Where am I getting wrong?


#2

Close enough. 'While' loops don't work like 'for' loops. You have to increment inside of the loop :

var count=0;

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

loop();

Should work