Create a gist now

Instantly share code, notes, and snippets.

Variable shaddowing in coffee is to a problem!
(function() {
foo(function() {
var a1, a2;
a1 = void 0;
a2 = null;
return bar(function(value) {
a1 = value;
a2 = value;
return value;
# variable shadowing is not really a problem in coffee,
# you just need to be explicit, that you don't want to shadow it!
foo ->
a1 = undefined # long version
a2 = null # shorter (that I use personally) but not exactly same
bar (value)->
a1 = value
a2 = value
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment