Plz help me regarding the following code...im very bad at while loops


#1

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

where am i going wrong?


#2

set, outside (on top),:

var count = 0;

Also,

just call an empty loop function

loop();

outside (at the end, below) the loop.


#3

thank you! it worked!


#4

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