Created
October 12, 2017 19:59
-
-
Save M-Yankov/c108a22cdad124e58d69e88fe6b61c7c to your computer and use it in GitHub Desktop.
It seems that the following syntax for nested ternary operators is the most readable (for me);
This file contains hidden or 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
return | |
<First_Expression> ? "Value1" : | |
<Second_Expression> ? "Value2" : | |
<Third_Expression> ? "Value3": | |
"Value4"; // And so on.... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment