Created
July 15, 2022 07:17
-
-
Save vasylpb/ac381ae98e4f04cb50c8bb4a30e3d4a3 to your computer and use it in GitHub Desktop.
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
const map = new Map([ | |
[cond1 && cond2, 'case1'], | |
[cond2, 'case2'], | |
[cond3, 'case3'] | |
]) | |
return map.get(true) || 'defaultCase'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment