Created
February 27, 2019 00:14
-
-
Save benisi/6930408374812df15d91f840cc8b1b90 to your computer and use it in GitHub Desktop.
Illustrating closure
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
let outer = "outer"; | |
function scoping(){ | |
let inner = "inner"; | |
console.log(outer) // you get access outer | |
} | |
console.log(inner) // sorry you can't access inner |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment