+ 1

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

(functions() { var a = b = 3; })(); console.log("a defined?" + (typeof a !== 'undefined')) ; console.log("b defined?" + (typeof b !== 'undefined'));

10th Jun 2018, 1:30 PM
LIM Chantha
LIM Chantha - avatar
1 Antwort
+ 4
The code outputs to the console because it is called with console.log() function.
10th Jun 2018, 1:37 PM
Akash Pal
Akash Pal - avatar