Syntax error unexpected token else


#1

I'm not sure what I have wrong here if someone could give me a hint what I'm missing please.

for (var i = 0; i<21; i++){
if (i % 3 === 0 && i % 5 === 0){
console.log (i);
console.log("Fizzbuzz");
}
if else (i % 5 === 0) {
console.log (i);
console.log ("Buzz");
}
if else (i % 3 === 0) {
console.log (i);
console.log ("Fizz");
}
else {
console.log (i);
}
}


#2

In lines 6 and 10, shouldn't the code say "else if" instead of "if else"?


#3

`for (var i = 1; i <= 20; i++)

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

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

else {
console.log(i);
}`
In your code you have i and the other one drop the I and keep the other answer


#4

:flushed: Thanks! I am so embarrassed that was the major issue