...And the good!


#1

Hi, where is my mistake?

for (var i = 1; i <= 20; i++) {
console.log(i);
}
if(i % 3 === 0){
console.log(“Fizz”);
}
else if(i % 5 === 0)
console.log(“Buzz”);

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


#2

for (var 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);
}
}


#3

It does not print FizzBuzz


#4

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);
}
}


#5

seems you solved it yourself pretty quickly?