Multiple Identical Options in Switch Statements:
For this lesson why can i not do this :
1-3 - “Low”
4-6 - “Mid”
7-9 - “High”
switch (val) {
case (val >=1, val <=3):
answer = "Low";
break;
And I have to do this?:
switch (val) {
case (1):
case (2):
case (3):
answer= "Low";
break;
I mean its the exact same thing, no?