Switch - Case



switch () { 
   case "one":
      console.log("first");
      break;
   default:
}

switch (true) { 
   case (myNumber < 4):
      something;
      break;
   case (myNumber > 4) && (myNumber < 10):
      something;
      break;
   case (myNumber > 10) && (myNumber < 20):
      something;
      break;
   default:
}



© 2019 Better Solutions Limited. All Rights Reserved. © 2019 Better Solutions Limited TopPrevNext