Question 1
Consider the below JavaScript program.
const first = "Hello 3";
const obj1 = { first: "Hello 1", secondFunc: function () { console.log(this.first); }}
const obj2 = { first: "Hello 2", secondFunc: function () { console.log(this.first); this.secondFunc(); }}
obj1.secondFunc.apply(obj2, [2, 5, 9]);What will be the output of the above program, if executed?
Hello 1
Hello 1
Hello 2Hello 2
The program will result in an infinite loop
