I have the following object:
const person={
name: 'jordan',
greet: function(){console.log('hello, ' + this.name)}
}
I know I can do the following:
const greet = person.greet.bind(person)
I'm trying to bind person using arrow notation. Is it possible?
I thought maybe
const greet = person.greet(()=>(person.greet))
or
const greet = person.greet(()=>(function(){person.greet}))
but both of those give immediate execution and greet remains undefined