Javascript TUTORIAL
Switch statement break
The switch statement continues to execute the code until in encounters the break statement. If you do nnot include a break statement, it will continue to execute the code in the next case statement.
Carefully take a look at the following example.
|
This code will produce the following output
Height is equal 62 inches
height is more than 5 feet
Notice that after executing the statement next to case 62 :, it continues to execute the code next to case 63:.
You can try this example online here.
Javascript case break