Medium'this' Binding💻 Output Question

bind permanently fixes this — call cannot override it

💡

Hint

bind() wins over call/apply. A bound function's this is permanent and cannot be overridden.

What does this output?

function getName() { return this.name; }
const alice = { name: 'Alice' };
const bob   = { name: 'Bob' };
const boundAlice = getName.bind(alice);
console.log(boundAlice());
console.log(boundAlice.call(bob));

Correct Output

Alice
Alice

Why this output?

Explanation: bind creates a permanently bound function. Even .call(bob) cannot override the bound this.

Key Insight: bind() wins over call/apply. A bound function's this is permanent and cannot be overridden.

More 'this' Binding Output Questions

EasyMethod call — this is the calling objectEasyArrow function has no own this — inherits lexicallyMediumcall vs apply — same result, different syntaxMediumArrow callback inside method preserves this

Practice predicting output live →

66 output questions with instant feedback

💻 Try Output Quiz