What would be the output of the following? (Based on IIFE in JS)
@Yomesh Gupta
(function () {
var first = second = 5;
})();
console.log(second);
Option 1
undefined
Option 2
5
Option 3
Uncaught Error
Option 4
null
(function () {
var first = second = 5;
})();
console.log(second);
undefined
5
Uncaught Error
null