title: Does ordering matter in if-else statements for fizz buzz?
body: <p>I Just did the fizz buzz test, but I did it differently that the answer below. I put the first "if " statement (i.e., <code>i%3===0 &amp;&amp; i%5===0</code>) as my last "else if" statement instead and for some reason it didn't work. My logic is the same however. </p>
  
  <p>Does anyone know why it doesn't work? Does it really matter which position you put for the if, else statements? Below is the answer key.    </p>
  
  <pre><code>for(var i = 1; i &lt; 100; i++){
        if(i%3 === 0 &amp;&amp; i%5 === 0){
          console.log("FizzBuzz");
        }
        else if(i%3 === 0) {
          console.log("Fizz");
        }
        else if(i%5 === 0){
          console.log("Buzz");
        }
        else {
          console.log(i);
        }
  }
  </code></pre>
  
  <p>This was my answer:</p>
  
  <pre><code>for(var i = 1; i &lt; 100; i++){
       if (i%5 === 0){
          console.log("Buzz");
        }
        else if(i%3 === 0) {
          console.log("Fizz");
        }
        else if (i%3 === 0 &amp;&amp; i%5 === 0){
          console.log("FizzBuzz");
        }
        else {
          console.log(i);
        }
  }
  </code></pre>