Created
February 1, 2019 21:36
-
-
Save mohessaid/2da3b7179d47738c964cc5050fe1753f to your computer and use it in GitHub Desktop.
The switch statement quirck
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var a = 'a'; | |
var b = 'b'; | |
switch(a,b){ | |
case 'a', 'b': | |
console.log('first case'); | |
break; | |
case 'z', 'd': | |
console.log('second case'); | |
break; | |
default: | |
console.log('default case'); | |
break; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment