Last active
June 24, 2017 10:27
-
-
Save davidbonnet/9809828 to your computer and use it in GitHub Desktop.
CoffeeScript local variables bug?
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 code… | |
a = 42 | |
f = -> | |
a = 42 | |
return | |
# …compiles to… | |
a = 42; | |
f = function() { | |
a = 42; | |
}; | |
# …instead of this: | |
a = 42; | |
f = function() { | |
var a; | |
a = 42; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment