Created
September 23, 2020 13:48
-
-
Save orhanveli/af7fd930639f0e399eb7f53bb2bea96f to your computer and use it in GitHub Desktop.
What will the code below output to the console and why?
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(){ | |
var a = b = 3; | |
})(); | |
console.log("a defined? " + (typeof a !== 'undefined')); | |
console.log("b defined? " + (typeof b !== 'undefined')); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment