Question 2
Consider the below JavaScript program.
let x = 5;(function () { console.log(x); let x = 10;})();What will be the output of the above program?
—
Consider the below JavaScript program.
let x = 5;(function () { console.log(x); let x = 10;})();What will be the output of the above program?
—
Correct answer
Question 2 of 16 in the IIT Madras BS Modern Application Development II (MAD 2) Quiz 1 paper sat on 23 Feb 2025, in the January 2025 term (IIT M DIPLOMA AN EXAM QDD2 23 Feb 2025). It carries 2 marks.