Skip to content

Instantly share code, notes, and snippets.

@drewolson

drewolson/non_spooky.rb

Last active Dec 31, 2015
Embed
What would you like to do?
JavaScript: spooky action at a distance
foo = 1
lambda do
if true
puts foo
else
foo = 2
end
end.call
# => 1
var foo = 1;
(function () {
if (true) {
console.log(foo);
} else {
var foo = 2;
}
})();
// => undefined
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment