What will be the output of the following code?
const person = {
name: 'John',
greet: () => {
console.log(`Hello, ${this.name}!`);
}
};
person.greet();
What will be the output of the following code?
const person = {
name: 'John',
greet: () => {
console.log(`Hello, ${this.name}!`);
}
};
person.greet();