Skip to content

Instantly share code, notes, and snippets.

@marcab
Created June 26, 2011 04:39
Show Gist options
  • Save marcab/1047243 to your computer and use it in GitHub Desktop.
Save marcab/1047243 to your computer and use it in GitHub Desktop.
Hoisting!
var k = 0;
(function () {
console.log(k);
k = 5;
console.log(k);
var k = 3;
console.log(k);
})();
console.log(k);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment