Skip to the page

JS core · Concept

call vs apply vs bind

The interviewer asks

Difference between call, apply and bind? Give a real use case for each.

Then

Follow-ups the interviewer asks next

  1. Write bind from scratch (see Polyfills).
  2. fn.bind(a).bind(b)(): what is this? (still a.)
  3. Partial application with bind.
  4. Can you bind an arrow function?

The answer

What a strong answer covers

  • call(this, ...args) and apply(this, argsArray) invoke immediately; bind returns a new function with this and leading args fixed
  • Uses: borrowing methods (Array.prototype.slice.call(arguments)), Math.max.apply(null, arr) (now spread), binding handlers
  • Bound functions ignore later call/bind this, but new still works on them

The red pen

Common traps

Avoid:thinking bind invokes the function; thinking re-binding works.

Practise this out loud

Say your answer out loud to an AI interviewer that follows up, and get a score for it.

Practise by voice

Practise questions like this out loud

Sign up and start with a 15-minute interview with the full report, and an English conversation. No card needed.

Start your free interview