showing results for - "switch case mdn"
Mahe
15 Sep 2020
1switch (expression) {
2  case value1:
3    //Statements executed when the
4    //result of expression matches value1
5    [break;]
6  case value2:
7    //Statements executed when the
8    //result of expression matches value2
9    [break;]
10  ...
11  case valueN:
12    //Statements executed when the
13    //result of expression matches valueN
14    [break;]
15  [default:
16    //Statements executed when none of
17    //the values match the value of the expression
18    [break;]]
19}