[S.O.S.] FizzBuzz Introduction to Objects 3


#1

Hello. I tried making a switch instead of using if/else statements.
Someone please tell me where I went wrong.

for (var i = 0; i < 21; i++) {
switch(i) {
case i % 3 === 0 && i % 5 !== 0:
console.log("Fizz");
break;
case i % 3 !== 0 && i % 5 === 0:
console.log("Buzz"):
break;
case i % 15 === 0:
console.log("FizzBuzz");
break;
default
console.log(i);
}
}


#2
console.log("Buzz"):    <==== Check this
break;  
case i % 15 === 0:    
console.log("FizzBuzz");    
break;  
default    <==== and Check this
console.log(i);

#3

Fixed it. Thank you!