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