Do you know what will be the output of this code?
JavaScript
function greet() {
return this.name;
}
const bound = greet.bind({ name: "Ana" });
console.log(bound.call({ name: "Bob" }));
Show answer and explanation
The answer is "Ana".
bind returns a new function with this permanently set. call and apply can’t override it. Only new can, and that’s rarely what you want.