Difference between call(), apply() and bind()

June 21, 2025

Key difference between call and apply method is that, the call method accepts arguments as individual parameters(i.e., a list of parameters), while apply accepts arguments as a single array

Reference: What is the difference between call() apply() & bind()?


call()

function test(...arguments) {
    console.log(this.foo, ...arguments); // bar 10 20
}

test.call({ foo: 'bar' }, 10, 20);

apply()

function test(...arguments) {
    console.log(this.foo, arguments); // bar 10 20
}

test.apply({ foo: 'bar' }, 10, 20);

bind()

function test(...arguments) {
    console.log(this.foo, ...arguments); // bar 10 20
}

const bindedFn = test.bind({ foo: 'bar' }, 10, 20);
bindedFn();

© 2025 Abhinav Rajesh

Source Code