5. Practise makes perfect / "SyntaxError: missing formal parameter"


#1

Hi,

When I write my code, i get this answer: "SyntaxError: missing formal parameter". I wonder what is wrong with it?

//Remember to set your condition outside the loop!
var count = 0;

var loop = function(var counter === 0; counter < 3; counter++;){
    while(count){console.log(count);
        //Your code goes here!
    }
};

loop(count);

#2

@mariamariiia
Look at your syntax:

Remember to define a function looks like this:

var functionName = function(optional parameter) {
// We execute the codes in the bracket
};

Make sure also that your while loop isn't infinite.