Created
August 11, 2014 15:05
-
-
Save lukehedger/82a9d2027486d6f2b1d0 to your computer and use it in GitHub Desktop.
Nested If/Then/Else in CoffeeScript
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
x = if a then (if b then 1 else 0) else 0 | |
# a and b => x is 1 | |
# a and !b => x is 0 | |
# !a => x is 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment