Last active
August 6, 2019 19:00
-
-
Save ionelh/211d174d7d5947d42b8b5b2df4161f54 to your computer and use it in GitHub Desktop.
Gist for medium article "How JavaScript Works"
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
function a() { | |
var foo = 'bar'; | |
b(); | |
} | |
function b() { | |
console.log(foo); // throws ReferenceError: foo is not defined | |
} | |
a(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment