Last active
April 9, 2020 04:55
-
-
Save lenoraporter/b555e8de232dda4cb10950976b775f27 to your computer and use it in GitHub Desktop.
Global vs Functional Scope Part 2
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 beyonce = "Hi, I'm Beyonce!"; | |
function onStage() { | |
beyonce = “I am... Sasha Fierce”; | |
var jayZ = "I am out of breath!"; | |
} | |
console.log(jayZ); // error: JayZ is not defined | |
console.log(beyonce); // Hi, I'm Beyonce! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment