Question 31 of 10031%
31
Consider the below code snippets, What will be the output?
const person = { name: 'jhon' };
function sayHi() {
return this.name;
}
console.log(sayHi.call(person, 21));
console.log(sayHi.bind(person, 21));
31/100
const person = { name: 'jhon' };
function sayHi() {
return this.name;
}
console.log(sayHi.call(person, 21));
console.log(sayHi.bind(person, 21));