Skip to content

Instantly share code, notes, and snippets.

@devongovett
Created November 24, 2010 18:46
Show Gist options
  • Save devongovett/714171 to your computer and use it in GitHub Desktop.
Save devongovett/714171 to your computer and use it in GitHub Desktop.
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