default switch javascript code example
Example 1: js switch case
switch(expression) {
case x:
// code block
break;
case y:
// code block
break;
default:
// code block
}
Example 2: Javascript Switch Syntax
switch(condition){
case 'value1' :
//code
[break;]
case 'value2' :
//code
[break;]
.......
default :
//code
[break;]
}