Comutator boolean typescript

Exemple de cod

15
0

javascript toggle variabilă

var thing = true; //try changing this to false
thing = !thing; //the variable will go from true to false, or from false to true
1
0

mașina de scris testul de comutare per caz

switch(true) { 
   case if(constant1 == 1): { 
      //statements; 
      break; 
   } 
   case if(constant2 == 2): { 
      //statements; 
      break; 
   } 
   default: { 
      //statements; 
      break; 
   } 
} 

În alte limbi

Această pagină este în alte limbi

Русский
..................................................................................................................
English
..................................................................................................................
Italiano
..................................................................................................................
Polski
..................................................................................................................
한국어
..................................................................................................................
हिन्दी
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Česk
..................................................................................................................
Português
..................................................................................................................
ไทย
..................................................................................................................
中文
..................................................................................................................
Español
..................................................................................................................
Slovenský
..................................................................................................................
Балгарскі
..................................................................................................................
Íslensk
..................................................................................................................