3. .. And the Good - Fizz Buzz


#1

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

SyntaxError: Unexpected token )


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

You need to separate your for loop with ; and not ,


#3

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