title: How can I use ranges in a switch case statement using JavaScript?
body: <p>How can I use ranges in a switch case statement using JavaScript? So, instead of writing code for each and every single possibility, I'd like to group them in ranges, For example:</p>
  
  <pre><code>switch(myInterval){
     case 0-2:
        //doStuffWithFirstRange();
        break;
  
     case 3-6:
        //doStuffWithSecondRange();
        break;
  
     case 6-7:
        //doStuffWithThirdRange();
        break;
  
     default:
        //doStuffWithAllOthers();
  }
  </code></pre>