Get variable passed to switch statement
<p>This isn't the exact use scenario but I was wondering if it was possible to get the value passed to the switch statement without having to retype what is in the <code>switch()</code> part. </p>

<p>Example :</p>

<pre><code>switch(someObject.withSomevalue*(Math.random()*11)) {
    case 1 : alert("one");
    // more cases here
    default: alert(theNumberThatWasPassed);
}
</code></pre>

<p>If we run the <code>Math.random()</code> again we'll get another random number that very well could meet one of the cases, so calling what aws called in the switch(x) statement isn't an option. I've been just storing it in a variable - <code>x = someObject.withSomevalue*(Math.random()*11)</code> - and then passing it to the switch that way <code>switch(x)</code>, but I was wondering if it's possible to get the value passed to the switch within the switch statement.</p>
