...And The Good! 'End of input' error!


#1

https://www.codecademy.com/courses/spencer-sandbox/0/3?curriculum_id=506324b3a7dffd00020bf661#

Hej guys! I have a problem with this lesson. I cannot find the mistake and when I try to print out the code I get the error "SyntaxError: Unexpected end of input". Can anybody help me out?

This is my code:

var fizzBuzz = function () {
    for(var i = 1; i <= 20; i++) {

        if ( i % 3 === 0 && i % 5 === 0) {
                console.log("FizzBuzz");
    }   else if (i % 3 === 0) {
                console.log("Fizz");
    }   else if (i % 5 === 0) {
                console.log("Buzz");
    }   else    {
            console.log(i);
    }
}

fizzBuzz();

#2

var fizzBuzz = function () {

the { of your function doesn't have a matching } to close the function


#3

Stupid mistake! Thanks a lot!


#4