Question 1
Consider the following JavaScript code. What will be logged on to the console once the code is executed?
function checkThis() { return this.name}const Obj1 = { name: 'Obj1', checkThis: checkThis,}const Obj2 = { name: 'Obj2', checkThis: checkThis,}console.log(Obj2.checkThis(), Obj1.checkThis.call(Obj2))Obj1 Obj1
Obj1 Obj2
Obj2 Obj1
Obj2 Obj2