Created
November 23, 2015 21:01
-
-
Save danielantelo/b2e737a6fa4015443c5c to your computer and use it in GitHub Desktop.
Simple scoping and hoisting js exercise
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 foo = 1; | |
| (function() { | |
| console.log(foo); | |
| var foo = 2; | |
| var baz = 3; | |
| bar = 4; | |
| })(); | |
| console.log(foo); | |
| console.log(bar); | |
| console.log(baz); |
Author
yes , i got it
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

undefined
1
4