FizzBuzz


#1

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);
}
};
this is my code I dont know where I am going wrong ? can someone tell me?
me error is "you printed the wrong number of items"


#2

The problem is caused by the semicolon behind your for(i=0; i<=20; i++) !!! ; !!! {.

Try deleting that and it should work!


#3

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