Created
February 21, 2020 22:55
-
-
Save jasminegmp/135da135c025e2fd3de7bdfa4d39b05a 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
function myFunction(){ | |
let a; // a's declaration is hoisted here, but remains uninitialized | |
a // Will get a ReferenceError: Cannot access 'a' before initialization | |
console.log(a); | |
} | |
myFunction(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment