And The Good


#1


getting the error unexpected token==
what am I doing wrong?


for (i=1;i<21;i++)
{
    if((i%===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);
}


#2

check the first argument of your if statement looks like your missing something


#3

Did you mean to write, i % 3 === 0?


#4

you also have a few more syntax errors check the if statement and the end of your for loop look at the blocks. your code blocks should have curly braces to open and close them


#5

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