Skip to content

Instantly share code, notes, and snippets.

@bad6e
Last active November 22, 2019 18:45
Show Gist options
  • Save bad6e/73eee2582653f6a5f319ddd493d0feb6 to your computer and use it in GitHub Desktop.
Save bad6e/73eee2582653f6a5f319ddd493d0feb6 to your computer and use it in GitHub Desktop.
function whatIsDisneyLand() {
// Functionally Scoped Variables
var themeParkLocation = "Disneyland is Happiest Place on Earth"
let question = "Have you been?"
const response = "Too Many Times"
console.log(`${themeParkLocation} ${question} ${response}`)
}
whatIsDisneyLand()
// returns
// Disneyland is Happiest Place on Earth Have you been? Too Many Times
console.log(`${themeParkLocation} ${question} ${response}`)
// returns
//VM330:1 Uncaught ReferenceError: themeParkLocation is not defined
// at <anonymous>:1:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment