Question 5
What will be logged on to the console, if the program written below is executed?
{ let x = 10 { let getNum = () => { return x + 10 } } console.log(getNum())}10
NaN
Undefined
ReferenceError
What will be logged on to the console, if the program written below is executed?
{ let x = 10 { let getNum = () => { return x + 10 } } console.log(getNum())}10
NaN
Undefined
ReferenceError
Correct answer
ReferenceError
Question 5 of 16 in the IIT Madras BS Modern Application Development II (MAD 2) Quiz 1 paper sat on 16 Oct 2022, in the September 2022 term (IIT M QUIZ 1 FOUNDATION DAD DIPLOMA QPD2 16 Oct 2022). It carries 3 marks.