What is wrong ? help me


#1

var count = i

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

loop(count);


#2

There are many things wrong here. First:

var loop = function(i=0, i < 3, i+= 1) {

Is bad syntax. It should be:

var loop= function() {

Also:

count = i;

Count should equal a value; true:

count = true;

Lastly, don't call your function on anything:

loop(count);

Should be:

loop();