In VB, if I wanted to match case register, it would look like this:
Select (somevalue)
Case 1, 2, 3:
Do Something
End Select
In C # and Javascript
switch (someValue) {
case 1:
case 2:
case 3:
break;
}
However, this runs without error in Javascript
switch (someValue) {
case 1, 2, 3:
break;
}
But does not do what is expected. What is this actually doing?
The reason I'm asking is because if I hover over 1, 2 or 3 in firebug, it indicates the clock is false. It is so clear what the code evaluates, but what it evaluates.
source
share