13/3 Help


#1

for(var i=0; i<21; 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);
}
};

Above is a copy of my code for trying to finish lesson 13/3. its printing exactly what i need it to print with "FizzBuzz", "Fizz", and "Buzz" printing to the console in their correct spaces. However code academy is still giving me an error message that reads:
"Oops looks like you printed out the wrong number of items"

please help


#2

Maybe start
for(var i=0; i<21; i++)
as
for(var i=1; i<21; i++)
instead? As you want a loop from 1-20, rather than 0-20, all the best!


#3

Thank you so much. And you were correct. It was something as simple as that