JavaScript Switch Statement
The switch statement is used to perform different actions based on different conditions. The JavaScript Switch Statement Use the switch statement to select one of many code blocks to be executed. Syntax switch(expression) { case x: // code block break; case y: // code block break; default: // code block} This is how it works: The switch expression is evaluated once. The value of the expression is compared with… Read More »