title: Simple modulo tester
body: <p>I have a simple, modulo based script, which runs for 3 and 6 digits to <code>else</code>. There are also cases for these numbers, which condition should fit also to these numbers.</p>
  
  <pre><code>function caffeineBuzz(n){
      var returnvalue;
  
      if (n % 3 == 0)
          returnvalue = "Java";
      if (n % 3 == 0 &amp;&amp; n % 4 == 0)
          returnvalue = "Coffee";
      if (n % 3 == 0 &amp;&amp; n % 2 == 0)
          returnvalue = "Java" + "Script"
      if (n % 4 == 0 &amp;&amp; n % 2 == 0)
          returnvalue = "Coffee" + "Script"
      else
          returnvalue = "mocha_missing!"
  
       return returnvalue;
  }
  </code></pre>
  
  <p><code>n</code> stands for input, that is an integer and returnvalue should be a string.</p>
  
  <p><strong>Update:</strong>
  Most specific -> less specific approach helped me, but there are cases, when it returns with wrong value.</p>
  
  <pre><code>function caffeineBuzz(n){
      var returnvalue;
  
      if (n % 4 == 0)
          returnvalue = "Coffee" + "Script"
      else if (n % 3 == 0 &amp;&amp; n % 4 == 0)
          returnvalue = "Coffee";
      else if (n % 3 == 0 &amp;&amp; n % 2 == 0)
          returnvalue = "Java" + "Script"
      else if (n % 3 == 0)
          returnvalue = "Java";
      else
          returnvalue = "mocha_missing!"
  
       return returnvalue;
  }
  </code></pre>