⇧
Contact Us
||
Privacy Policy
||
About Us
Home
HTML
CSS
JS
Bootstratp
PHP
Java
Program
Interview Ques
Menu ▼
JS Tutorials
What is JS
JS Example
Js Comments
JS Variable
JS DataType
JS Operator
JS If Statements
JS Switch
JS Loop
JS Function
JS Object
JS Arrary
JS String
JS Date
JS Math
JS Number
next →
← prev
JS Switch
Executes one statement in multiple condition.that is called switch statement.
Syntax:
switch(condition){ case value1: //code to be executed; break; //optional case value2: //code to be executed; break; //optional ...... default: code to be executed if all cases are not matched; }
Example:
Test it Now
Next Topic
← prev
next →