JavaScript Switch Statement

JavaScript Switch Statement


JavaScript Switch Statement
The switch statement used to specify many alternative blocks of code to be executed. In other words, The Switch statement is used to perform different actions based on different conditions like on or off.
Example1
Output
Example2
Output