Question 12
Consider the below JavaScript program:
const globalVar = 50;
const object1 = { globalVar: 100, method1: function() { console.log(globalVar, this.globalVar); return () => { console.log(globalVar, this.globalVar); } }}
const object2 = { globalVar: 200, method2: () => { console.log(globalVar, this.globalVar); return function() { console.log(globalVar, this.globalVar); } }}
const fn1 = object1.method1();fn1();const fn2 = object2.method2();fn2();What will be the output of the above program on the browser's console, if executed?