title: is switch(true) {... valid javascript?
body: <p>I recently came across code where a switch statement seemed reversed with the answer (boolean) in the switch and the expressions in the case. The code ran fine as intended but I'm concerned about cross browser. Is it valid javascript?</p>
  
  <pre><code>switch(true) {
    case (y &lt; 20):
      //
      break;
    case (y &lt; 60):
      //
      break;
    case (y &lt; 130):
      //
      break;
  }
  </code></pre>