...And the good


#1

Why is it wrong? "Oops, try again. It looks like you printed out the wrong number of items. "

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


#2

you have to print 1 till 20 (inclusive), you print 0 to 20 (inclusive)


#3

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