Where?


#1

This is my code, where is the SyntaxError: Unexpected token )?

for (i = 1; i<=20, i++){
if (i%3 === 0){
console.log("Fizz");
} else if (i%5 === 0){
console.log("Buzz");
} else if (i%3===0 && i%5===0){
console.log("FizzBuzz");
} else{
console.log(i);
};
};


#2

here:

for (i = 1; i<=20, i++)

after the for loop condition you use a comma, this should be a semi-colon


#3

cool, thanks for the help


#4

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