Created
September 11, 2017 17:30
-
-
Save Chalarangelo/de3ce23e3eeea0434bd132455c5ee035 to your computer and use it in GitHub Desktop.
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
// This variable is part of the global scope | |
var globalVariable = 10; | |
function someFunction(){ | |
// globalVariable is accessible from someFunction, | |
// as it is part of the global scope | |
console.log(globalVariable); | |
} | |
someFunction(); // Prints 10 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment