Question 3
What is the output of this code?
console.log(myVar);console.log(myFunc());
var myVar = "hello";function myFunc() { return "world";}hello, world
undefined, world
ReferenceError
undefined, undefined
What is the output of this code?
console.log(myVar);console.log(myFunc());
var myVar = "hello";function myFunc() { return "world";}hello, world
undefined, world
ReferenceError
undefined, undefined
Correct answer
undefined, world
Question 3 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.