Question 21 of 5836%
21
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));
21/58
const person = { name: 'jhon' };
function sayHi() {
return this.name;
}
console.log(sayHi.call(person, 21));
console.log(sayHi.bind(person, 21));