Skip to content

Instantly share code, notes, and snippets.

@lukehedger
Created August 11, 2014 15:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lukehedger/82a9d2027486d6f2b1d0 to your computer and use it in GitHub Desktop.
Save lukehedger/82a9d2027486d6f2b1d0 to your computer and use it in GitHub Desktop.
Nested If/Then/Else in CoffeeScript
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