What will the code below output to the console and why?

Talk about anything
HarleyKelvin
Posts: 4
Joined: 13 Feb 2017, 05:27
Location: USA
Contact:

What will the code below output to the console and why?

22 Mar 2017, 07:08

(function(){
var a = b = 3;
})();

console.log("a defined? " + (typeof a !== 'undefined'));
console.log("b defined? " + (typeof b !== 'undefined'));

Return to “Off-topic Discussion”

Who is online

Users browsing this forum: No registered users and 83 guests