Question 9
Consider the following JavaScript code snippet shown below.
var value = 50;
const mainObj = { value: 42, getValue: function() { return this.value; } };
const nextObj = {value: 100};
const getValue1 = mainObj.getValue.bind()(nextObj);const getValue2 = mainObj.getValue.bind(nextObj)();
console.log(getValue1);console.log(getValue2);What will be output on browser’s console for the above JavaScript code?