Created
July 4, 2012 02:15
-
-
Save jamesmoriarty/3044809 to your computer and use it in GitHub Desktop.
Coffeescript Ternary Statements
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
# toggle order | |
order = ( order == "desc" ? "asc" : "desc" ) | |
# var order, _ref; | |
# | |
# order = (_ref = order === "desc") != null ? _ref : { | |
# "asc": "desc" | |
# }; |
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
# toggle order | |
order = if order == "desc" then "asc" else "desc" | |
# var order; | |
# | |
# order = order === "desc" ? "asc" : "desc"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment