javascript case break code example
Example 1: javascript line break
//in JavaScript, you can declare a line break (or new line)
//with the \n character.
var linebreak = '\n';
Example 2: switch javascript
switch (a) {
case 1:
alert('case 1 executed');
break;
case 2:
alert("case 2 executed");
break;
case 3:
alert("case 3 executed");
break;
case 4:
alert("case 4 executed");
break;
default:
alert("default case executed");
}