Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

JavaScript Switch Statement

switch(variable/expression) {
    case value1:  
        // body of case 1
        break;

    case value2:  
        // body of case 2
        break;

    case valueN:
        // body of case N
        break;

    default:
        // body of default
}
Source by www.freecodecamp.org #
 
PREVIOUS NEXT
Tagged: #JavaScript #Switch #Statement
ADD COMMENT
Topic
Name
9+1 =