Skip to content

Instantly share code, notes, and snippets.

@Chalarangelo
Created September 11, 2017 17:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Chalarangelo/de3ce23e3eeea0434bd132455c5ee035 to your computer and use it in GitHub Desktop.
Save Chalarangelo/de3ce23e3eeea0434bd132455c5ee035 to your computer and use it in GitHub Desktop.
// 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