title: Expression inside switch case statement
body: <p>I'm trying to create a switch statement but I can't seem to be able to use an expression that gets evaluated (rather than a set string/integer). I can easily do this with if statements but case should hopefully be faster.</p>
  
  <p><strong>I'm trying the following</strong></p>
  
  <pre><code>function reward(amount) {
      var $reward = $("#reward");
      switch (amount) {
          case (amount &gt;= 7500 &amp;&amp; amount &lt; 10000):
              $reward.text("Play Station 3");
              break;
          case (amount &gt;= 10000 &amp;&amp; amount &lt; 15000):
              $reward.text("XBOX 360");
              break;
          case (amount &gt;= 15000):
              $reward.text("iMac");
              break;
          default:
              $reward.text("No reward");
              break;
      }
  }
  </code></pre>
  
  <p>Am i missing something obvious or is this not possible? Google hasn't been friendly in this case.</p>
  
  <p><strong>Any help/pointers appreciated</strong></p>
  
  <p><strong>M</strong></p>