Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

switch c++

switch (n){
  case 1:
    //do something
    break;
  case 2:
    //do something
    break;
  default: //execute if there's no case match
    //do something
}
 
PREVIOUS NEXT
Tagged: #switch
ADD COMMENT
Topic
Name
6+5 =