Created
November 24, 2010 18:46
-
-
Save devongovett/714171 to your computer and use it in GitHub Desktop.
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
This CoffeeScript: | |
15 + if somevar then "%" | |
used to compile to this JavaScript: | |
15 + (somevar ? "%" : null) | |
which returned 15 if somevar was false. | |
Now it compiles to: | |
15 + (somevar ? "%" : void 0) | |
which returns NaN. | |
Broken code. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment