title: javascript FizzBuzz / if else statements
body: <p><strong>Here is the code</strong>:</p>
  
  <pre><code>var i = 0;
  for (i = 1; i &lt;= 20; i++) {
      if (i % 5 === 0 &amp;&amp; i % 3 === 0) {
          console.log("FizzBuzz");
      } else if (i % 5 === 0) {
          console.log("Buzz");
      } else if (i % 3 === 0) {
          console.log("Fizz");
      } else {
          console.log(i);
      }
  }
  </code></pre>
  
  <p><strong>and this is the output</strong>:</p>
  
  <pre><code>1
  2
  Fizz
  4
  Buzz
  Fizz
  7
  8
  Fizz
  Buzz
  11
  Fizz
  13
  14
  FizzBuzz
  16
  17
  Fizz
  19
  Buzz
  </code></pre>
  
  <p>The code is ok and works well but I don't understand why does it only print <code>FizzBuzz</code> when logical operator &amp;&amp; is in <code>if</code> statement and not in <code>else if</code>?</p>