Skip to content

Instantly share code, notes, and snippets.

@ohanhi
Last active Nov 5, 2020
Embed
What would you like to do?
console.log
var x = 1;
console.log(x);
if(1) {
var x = 2;
console.log(x);
}
console.log(x);
var x = 10;
function foo(x) {
if(!x) {
x = 4;
}
console.log(x, arguments);
};
foo(7);
console.log(x);
foo.call(7);
var foo = (function() {
console.log(x);
})();
foo(5);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment