And the good!


#1

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

it is showing Oops, try again. It looks like you printed out the wrong number of items.
where is the mistake???
`


#2

Start with 1.

The order is off, too. It will never print FizzBuzz.


#4

okk thanx...:thumbsup:


#5

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