bindbeginnerfunction greet() { return this.name }
const hi = greet.bind({ name: 'Alice' })
hi() // β 'Alice'bind() returns a new function with this permanently set to the provided object.
bind() returns a new function with this permanently set to the provided value.
Challenge: Use greet.bind({name: 'Bob'}) and verify the bound function returns 'Bob'.