detect 4 permutations of 2 variable values in a switch case statement
I have 2 variables,
Now I want to take different action on each of these 4 cases without using 4 if statements.
Is there a way to aggregate these cases so that it can be put as a simple
If there is no better way than using
This also works in VB6/VBA but not in many other languaguages like C++ and C#.
Here’s a simple proof: http://jsfiddle.net/avuxj/