Last active
January 1, 2018 12:03
-
-
Save dwickstrom/f42126e51c9e516a7263842bfc31252b to your computer and use it in GitHub Desktop.
ternary conditional formatting
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
const foo = a => | |
a === 1 ? 'one' | |
: a === 2 ? 'two' | |
: a === 3 ? 'three' | |
: /* else */ 'more' | |
const hello = foo => bar => | |
foo < bar ? foo * 2 | |
: foo > bar ? bar * 2 | |
: /* else */ 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment