"And the good!" syntax error?


#1



Introduction to Objects 1, "...And the good!" exercise: building the FizzBuzz counter.


The console throws out a SyntaxError ( unexpected ")" ) but I can't understand why.


for (i = 1, i < 21, 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);
    };

};.


#2

your for loop, you use ,. Why? you should use semi-colons:

for (i = 0; i < 35; i += 3)

see? ; instead of ,


#3

Also, semi-colons are only for statements or assignment not for a block of code as in the for loop and if-else if-else conditions.