Last active
December 10, 2019 08:39
-
-
Save AkatQuas/abe688c40409a5d89e12d2b26e5b2b75 to your computer and use it in GitHub Desktop.
what is the value of `a` ?
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
debugger; | |
var a; | |
if (true) { | |
a = {a: 2}; | |
function a() {} | |
a.ot = '9'; | |
a = {a: 4}; | |
console.log('1', a); | |
} | |
console.log('2', a); | |
// relevent question on stackoverflow | |
// https://stackoverflow.com/questions/58619924/confused-about-function-declaration-in | |
// https://stackoverflow.com/questions/31419897/what-are-the-precise-semantics-of-block-level-functions-in-es6 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment