Skip to content

Instantly share code, notes, and snippets.

@fujidig
Created September 9, 2011 13:01
Show Gist options
  • Save fujidig/1206140 to your computer and use it in GitHub Desktop.
Save fujidig/1206140 to your computer and use it in GitHub Desktop.
(function() {
var a = function() { print("a") };
a(); //=> a
function a() { print("b"); }
a(); //=> a
})();
(function() {
{
var a = function() { print("a") };
a(); //=> a
function a() { print("b"); }
a(); //=> b (← !!!!)
}
})();
(function() {
{
a(); // ReferenceError!
function a() { print("a"); }
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment