multiple identical options in switch statements

Solutions on MaxInterview for multiple identical options in switch statements by the best coders in the world

showing results for - "multiple identical options in switch statements"
Jonah
02 Sep 2017
1function sequentialSizes(val) {
2  var answer = "";
3  
4  switch(val) {
5    case 1:
6    case 2:
7    case 3:
8      answer = "Low";
9      break;
10    case 4:
11    case 5:
12    case 6:
13      answer = "Mid";
14      break;
15    case 7:
16    case 8:
17    case 9:
18      answer = "High";
19      break;
20  }
21
22  return answer;
23}
24