These three methods control what this refers to inside a function. They're essential for understanding JavaScript's execution model.
The Problem
call() — Invoke with explicit this
apply() — Same as call, but array arguments
bind() — Returns a new function with fixed this
Comparison
| Method | Invokes immediately? | Arguments | Returns |
|---|---|---|---|
| call | Yes | Individual | Function result |
| apply | Yes | Array | Function result |
| bind | No | Individual (partial) | New function |
Polyfill (Interview Classic)
Arrow Functions
Arrow functions ignore call, apply, and bind. Their this is always lexical (from the enclosing scope).