Created
March 16, 2015 20:34
-
-
Save andineck/7f24ef7a9bf0c24c31b9 to your computer and use it in GitHub Desktop.
variable shadowing
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 a = 1; | |
//undefined | |
function showA () { var a = 2; console.log(a);} | |
//undefined | |
a | |
//1 | |
showA() | |
//2 | |
a | |
//1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment