What would be the output? (Based on setTimeout)
@Yomesh Gupta
function sayName() {
setTimeout(() => {
console.log(this.name);
}, 1000);
}
sayName.call({
name: 'Yomesh'
});
Option 1
undefined
Option 2
value of the property name on the global object
Option 3
Yomesh
Option 4
ReferenceError