Hi Folks,
I'm sure this question has been asked before but the search function was not working for me and I need to find a solution fast.
I need to have a switch statment where each case contains a range of values. Somthing like:
switch(age) {
case < 20:
do something;
break;
case < 20:
do something else;
break;
}
Is there any way to do this with JS?
Mighty
I'm sure this question has been asked before but the search function was not working for me and I need to find a solution fast.
I need to have a switch statment where each case contains a range of values. Somthing like:
switch(age) {
case < 20:
do something;
break;
case < 20:
do something else;
break;
}
Is there any way to do this with JS?
Mighty