Using Math Functions in an IF statement
<p>Hi I've just started to learn JavaScript. I'm doing the exercises on <a href="http://www.codecademy.com/" rel="nofollow">http://www.codecademy.com/</a>. You can read it below:</p>

<p>FizzBuzz is a children's game where you count from 1 to 20. Easy, right?</p>

<p>Here's the catch: instead of saying numbers divisible by 3, say "Fizz". And instead of saying numbers divisible by 5, say "Buzz". For numbers divisible by both 3 and 5, say "FizzBuzz".</p>

<p>"1, 2, Fizz, 4, Buzz"...and so forth</p>

<p>Let's start by using console.log to print out all of the numbers from 1 and 20.</p>

<p>But don't type out the numbers in order—find a more awesome way!</p>

<p>I can get the numbers to print using a for loop but now I don't know how to replace the numbers with strings. </p>

<p>I thought about doing an IF statement like "if i divided by 3 is zero, then print Fizz" but I'm not sure how to do it. See what I've done so far below:</p>

<pre><code>var i;
for (i = 0; i &lt;=20; i++) {
    console.log(i);
}
if (i / 3 = 0) {
    console.log("Fizz")
}
</code></pre>

<p>Any help would be great. </p>
