Created
March 24, 2019 02:49
-
-
Save Damimd10/ba7efd95491a191bc99b5d676f1ca561 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
// global scope | |
var name = 'Damian'; | |
function getName(name) { // passing (name) makes it local scope | |
console.log(a); // log the given argument, not the global value of '1' | |
} | |
// local scope again | |
function localScope() { | |
var isGlobalScope = false; | |
console.log(isGlobalScope); // log false | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment