Created
April 30, 2017 08:46
-
-
Save lenafaure/76600ae8280f9bbd131f5c7397bf439a to your computer and use it in GitHub Desktop.
Place of function in the code
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 myVariable = "global"; | |
printVariable(); // Prints "local" | |
function printVariable() { | |
var myVariable = "local"; | |
console.log(myVariable); | |
} | |
printVariable(); // Prints "local" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment