Last active
November 5, 2020 09:09
-
-
Save ohanhi/f362245659fccea2b671 to your computer and use it in GitHub Desktop.
console.log
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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