12.Fizz


#1

help? not sure how to fix this?

for (var i=1; i<=20; i++)
{
console.log(i);

if (i%3===0)
console.log("Fizz");

}


#2

for (var i=1; i < 21; i++)
{
console.log(i); //make this one on your else statement

if (i%3===0) // here, you are missing opening bracket "{"
console.log("Fizz"); //and here, I think you are supposed to return it not log it.

}


#3

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