Last active
August 27, 2016 13:24
-
-
Save cloudshooterhuman/b386a19af520f8c46c96f21867f3a2d9 to your computer and use it in GitHub Desktop.
https://repl.it/CuhM/0 created by selmanon
This file contains hidden or 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 level1 = "a"; | |
function outer() { | |
var level2 = "b"; | |
function middle() { | |
var level3 = "c"; | |
// the function 'inner' can access all variables in the outer scopes | |
function inner() { | |
document.write (level1 + level2 + level3); | |
} | |
inner(); | |
} | |
middle(); | |
} | |
outer(); | |
This file contains hidden or 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
Native Browser JavaScript | |
>>> abc | |
=> undefined |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment