Use .bind() when you want that function to later be called with a certain context, useful in events. Use .call() or .apply() when you want to invoke the function immediately, and modify the context.

Call/apply call the function immediately, whereas bind returns a function that, when later executed, will have the correct context set for calling the original function. This way you can maintain context in async callbacks and events.

I do this a lot:

function MyObject(element) {
    this.elm = element;

    element.addEventListener('click', this.onClick.bind(this), false);
};

MyObject.prototype.onClick = function(e) {
     var t=this;  //do something with [t]...
    //without bind the context of this function wouldn't be a MyObject
    //instance as you would normally expect.
};

I use it extensively in Node.js for async callbacks that I want to pass a member method for, but still want the context to be the instance that started the async action.

A simple, naive implementation of bind would be like:

Function.prototype.bind = function(ctx) {
    var fn = this;
    return function() {
        fn.apply(ctx, arguments);
    };
};

There is more to it (like passing other args), but you can read more about it and see the real implementation on the MDN.

Answer from Chad on Stack Overflow
🌐
Medium
medium.com › @jhawleypeters › javascript-call-vs-apply-vs-bind-61447bc5e989
Javascript Function Methods: Call vs Apply vs Bind | by Jonathan Hawley-Peters | Medium
November 22, 2019 - Javascript Function Methods: Call vs Apply vs Bind Javascript functions have these three methods: call(), apply() and bind(). They have more methods that I’m going to ignore. Don’t worry …
Top answer
1 of 16
921

Use .bind() when you want that function to later be called with a certain context, useful in events. Use .call() or .apply() when you want to invoke the function immediately, and modify the context.

Call/apply call the function immediately, whereas bind returns a function that, when later executed, will have the correct context set for calling the original function. This way you can maintain context in async callbacks and events.

I do this a lot:

function MyObject(element) {
    this.elm = element;

    element.addEventListener('click', this.onClick.bind(this), false);
};

MyObject.prototype.onClick = function(e) {
     var t=this;  //do something with [t]...
    //without bind the context of this function wouldn't be a MyObject
    //instance as you would normally expect.
};

I use it extensively in Node.js for async callbacks that I want to pass a member method for, but still want the context to be the instance that started the async action.

A simple, naive implementation of bind would be like:

Function.prototype.bind = function(ctx) {
    var fn = this;
    return function() {
        fn.apply(ctx, arguments);
    };
};

There is more to it (like passing other args), but you can read more about it and see the real implementation on the MDN.

2 of 16
531

They all attach this into function (or object) and the difference is in the function invocation (see below).

call attaches this into function and executes the function immediately:

var person = {  
  name: "James Smith",
  hello: function(thing) {
    console.log(this.name + " says hello " + thing);
  }
}

person.hello("world");  // output: "James Smith says hello world"
person.hello.call({ name: "Jim Smith" }, "world"); // output: "Jim Smith says hello world"

bind attaches this into function and it needs to be invoked separately like this:

var person = {  
  name: "James Smith",
  hello: function(thing) {
    console.log(this.name + " says hello " + thing);
  }
}

person.hello("world");  // output: "James Smith says hello world"
var helloFunc = person.hello.bind({ name: "Jim Smith" });
helloFunc("world");  // output: Jim Smith says hello world"

or like this:

...    
var helloFunc = person.hello.bind({ name: "Jim Smith" }, "world");
helloFunc();  // output: Jim Smith says hello world"

apply is similar to call except that it takes an array-like object instead of listing the arguments out one at a time:

function personContainer() {
  var person = {  
     name: "James Smith",
     hello: function() {
       console.log(this.name + " says hello " + arguments[1]);
     }
  }
  person.hello.apply(person, arguments);
}
personContainer("world", "mars"); // output: "James Smith says hello mars", note: arguments[0] = "world" , arguments[1] = "mars"                                     
Discussions

What are some use cases for call, apply, and/or bind?
The basic idea behind call/apply/bind is the same: explicitly set function parameters including this. The context changes a bit, but the use cases will all be niche instances when the normal ways of setting function parameters (i.e. placing them between the parentheses or to the left of the dot for this) are not sufficient. Apply First, apply. You will almost certainly never need apply. Why? Because the common use case has been supplanted by a new syntax: the spread operator (...). In the past, if you had your parameters in an array, apply was the way to get them into a function. const nums = [1, 2, 3]; const largest = Math.max.apply(null, nums); console.log(largest); // 3 These days, spread is easier to write and read. const nums = [1, 2, 3]; const largest = Math.max(...nums); console.log(largest); // 3 Call Okay, call works a lot like just, well, calling a function. The only difference is that the this moves from the left of the dot to the first parameter between the parentheses. const nums = [1, 2, 3]; console.log(nums.includes(2)); // true console.log(Array.prototype.includes.call(nums, 2)); // true When is this useful? Mostly never. Cases occasionally come up. Sometimes you want to call one object's method on a different object. Call lets you do that. It is always very technical and niche. Bind Bind is probably the most useful of the three, which isn't saying much. It allows you to pass parameters to a function before you call it, creating a new function with those parameters baked in. const nums = [1, 2, 3]; const numsIncludesThree = Array.prototype.includes.bind(nums, 3); console.log(numsIncludesThree()); // true nums.pop(); console.log(numsIncludesThree()); // false This is kind of neat. It allows you to build up functions out of parameters, and is related to awesome concepts like "partially applying" functions, "factory" functions, and "currying". That said, you don't actually see bind used all that often. It is clunky compared to other options like lodash's partial , and most people who write code like this also religiously avoid using this, which will always be the first parameter bind takes. For awhile it was common to see people use bind in their class definitions: class User { constructor(name) { this.name = name; this.greet = this.greet.bind(this); } greet() { console.log(`Hello, ${this.name}!`); } } This allows you to use your class method in circumstances where the this would not be set, for example as a callback to another function like an event listener or setTimeout. const user = new User('Sue'); setTimeout(user.greet, 1000); // Hello, Sue! This approach has mostly fallen out of fashion though. Using bind in the constructor is just fighting the way JS works because you wish it worked like a different language, people don't even use classes all that often anymore, and there are more straightforward ways to accomplish the same behavior. setTimeout(() => { user.greet(); }, 1000); // Hello, Sue! (no bind required) TLDR If you need them, you'll know. But you mostly won't. More on reddit.com
🌐 r/learnjavascript
14
11
September 18, 2022
call, apply, bind and function borrowing in JavaScript
Questions and posts about frontend development in general are welcome, as are all posts pertaining to JavaScript on the backend. ... call, apply and bind are 3 important methods in JavaScript and each of them are slightly different from one another and have different use cases. More on reddit.com
🌐 r/learnjavascript
5
2
June 29, 2022
.call vs .bind vs .apply...ELI5?

call calls a function with individual arguments:

fn.call( thisArg, 1, 2, 3 );      // fn( 1, 2, 3 ); with `this` in fn set to `thisArg`

apply calls a function with an array of arguments:

fn.apply( thisArg, [ 1, 2, 3 ] ); // fn( 1, 2, 3 ); with `this` in fn set to `thisArg`

bind doesn't call the function at all, but binds scope and arguments to a function so that when you call the resulting function the original one is called:

var newFn = fn.bind( thisArg, 1, 2, 3 ); // fn doesn't run yet
newFn();    // calls fn.call( thisArg, 1, 2, 3 );
newFn( 4 ); // calls fn.call( thisArg, 1, 2, 3, 4 );

So call vs apply just comes down to how you have your data (well that and call is much faster). Use bind when you want to do something later

More on reddit.com
🌐 r/learnjavascript
3
14
May 28, 2015
Do y'all ever use call/apply/bind?
I don't think I've used them since arrow functions became commonplace. Maybe I used them like once in some library that wasn't well written. That's about it. More on reddit.com
🌐 r/node
24
30
August 23, 2023
🌐
Educative
educative.io › answers › what-is-the-difference-between-call-apply-bind
What is the difference between call() apply() & bind() ?
call: binds the this value, invokes the function, and allows you to pass a list of arguments. apply: binds the this value, invokes the function, and allows you to pass arguments as an array.
🌐
GeeksforGeeks
geeksforgeeks.org › javascript › explain-call-apply-and-bind-methods-in-javascript
Explain call(), apply(), and bind() methods in JavaScript - GeeksforGeeks
The only difference from the bind polyfill is that MyCall does not return a new function - just like JavaScript’s built-in call(). The apply() method calls a function immediately and sets this to the first argument passed.
Published   January 22, 2026
🌐
CodeSweetly
codesweetly.com › call-apply-bind-javascript
call() vs apply() vs bind() in JavaScript | CodeSweetly
Instead, it only binds (assigns) the method to the new object. In contrast, call() automatically invokes the method on which you used it. Let’s take a closer look at its syntax.
Top answer
1 of 6
16
The basic idea behind call/apply/bind is the same: explicitly set function parameters including this. The context changes a bit, but the use cases will all be niche instances when the normal ways of setting function parameters (i.e. placing them between the parentheses or to the left of the dot for this) are not sufficient. Apply First, apply. You will almost certainly never need apply. Why? Because the common use case has been supplanted by a new syntax: the spread operator (...). In the past, if you had your parameters in an array, apply was the way to get them into a function. const nums = [1, 2, 3]; const largest = Math.max.apply(null, nums); console.log(largest); // 3 These days, spread is easier to write and read. const nums = [1, 2, 3]; const largest = Math.max(...nums); console.log(largest); // 3 Call Okay, call works a lot like just, well, calling a function. The only difference is that the this moves from the left of the dot to the first parameter between the parentheses. const nums = [1, 2, 3]; console.log(nums.includes(2)); // true console.log(Array.prototype.includes.call(nums, 2)); // true When is this useful? Mostly never. Cases occasionally come up. Sometimes you want to call one object's method on a different object. Call lets you do that. It is always very technical and niche. Bind Bind is probably the most useful of the three, which isn't saying much. It allows you to pass parameters to a function before you call it, creating a new function with those parameters baked in. const nums = [1, 2, 3]; const numsIncludesThree = Array.prototype.includes.bind(nums, 3); console.log(numsIncludesThree()); // true nums.pop(); console.log(numsIncludesThree()); // false This is kind of neat. It allows you to build up functions out of parameters, and is related to awesome concepts like "partially applying" functions, "factory" functions, and "currying". That said, you don't actually see bind used all that often. It is clunky compared to other options like lodash's partial , and most people who write code like this also religiously avoid using this, which will always be the first parameter bind takes. For awhile it was common to see people use bind in their class definitions: class User { constructor(name) { this.name = name; this.greet = this.greet.bind(this); } greet() { console.log(`Hello, ${this.name}!`); } } This allows you to use your class method in circumstances where the this would not be set, for example as a callback to another function like an event listener or setTimeout. const user = new User('Sue'); setTimeout(user.greet, 1000); // Hello, Sue! This approach has mostly fallen out of fashion though. Using bind in the constructor is just fighting the way JS works because you wish it worked like a different language, people don't even use classes all that often anymore, and there are more straightforward ways to accomplish the same behavior. setTimeout(() => { user.greet(); }, 1000); // Hello, Sue! (no bind required) TLDR If you need them, you'll know. But you mostly won't.
2 of 6
2
If I am expecting to have an object receive async calls, I tend to bind its methods. This makes it possible to say things like someWidget.addEventListner('change', myObject.handleChange); instead of someWidget.addEventListner( 'change' , event => myObject.handleChange(event) ); This code establishes a trampoline for starting a line of work that can be cancelled before it finishes, on the grounds that the input data on which the work is based are no longer valid. A trampoline, according to the protocols that I use, is an object that supports a defer(func, ...args) operation. This says that assuming that the work is continuing, func will be called with (...args) eventually and on a short stack. The simplest such defer would look like this: const defer = (func, ...args) => setTimeout(func, 0, ...args); This would meet the requirement that the function will be called eventually on the args and on a short stack, but it would not support a thread that could be canceled before it finishes and would not support a priority scheme, both of which I have implemented with my own trampoline code. Each of these, when I put them into effect, relies on setTimeout at the very bottom, however. Anyway, the implementation of the tramp for cancellability binds all the methods to the instance, in the .new method. This way, I never have to worry about using a method call like () => obj.method(...args) to cite them. I just name them, like obj.method and that suffices as a function to be called back, which is something that happens a lot when you are doing async stuff without relying on Promise.
🌐
DEV Community
dev.to › codecraftjs › understanding-call-apply-and-bind-essential-methods-in-javascript-d62
Understanding Call, Apply, and Bind: Essential Methods in JavaScript - DEV Community
May 23, 2023 - The call() and apply() methods are used to immediately invoke a function with a specified this value and arguments, while the bind() method returns a new function with a specified this value that can be called later.
Find elsewhere
🌐
Medium
medium.com › @omergoldberg › javascript-call-apply-and-bind-e5c27301f7bb
Javascript: call(), apply() and bind() | by Omer Goldberg | Medium
July 3, 2018 - The call() method does not make ... between how they work is that call() expects all parameters to be passed in individually, whereas apply() expects an array of all of our parameters....
🌐
JavaScript in Plain English
javascript.plainenglish.io › exploring-call-apply-and-bind-methods-in-javascript-fd4d6fb23813
Exploring Call, Apply, and Bind in JavaScript | JavaScript in Plain English
July 20, 2025 - Struggling with JavaScript functions? This guide breaks down call, apply, and bind with clear analogies, helping you finally grasp this keyword behavior.
🌐
LinkedIn
linkedin.com › pulse › what-difference-between-call-apply-bind-muhammad-rizwan
What is the difference between call, apply and bind?
December 9, 2022 - The apply method is similar to the call method, but instead of specifying the arguments to the function individually, it takes an array of arguments to be passed to the function. The bind method is used to create a new function with the same ...
🌐
freeCodeCamp
freecodecamp.org › news › understand-call-apply-and-bind-in-javascript-with-examples
How to Use the Call, Apply, and Bind Functions in JavaScript – with Code Examples
April 3, 2025 - The only difference is that in apply you can pass an array as an argument list. Bind is a function that helps you create another function that you can execute later with the new context of this that is provided.
🌐
OpenReplay
blog.openreplay.com › choosing-call-apply-bind-javascript-guide
Choosing Between call(), apply(), and bind() in JavaScript: A Developer's Guide
Each method serves a specific purpose in managing function context. While call() and apply() provide immediate execution with different argument formats, bind() creates reusable functions with fixed contexts.
🌐
DEV Community
dev.to › hebashakeel › difference-between-call-apply-and-bind-4p98
Difference between call,apply and bind - DEV Community
May 7, 2022 - In Object Oriented JavaScript, ... and methods via the prototype · Call( ): The call() method invokes a function with a given 'this' value and arguments provided one by one....
🌐
SheCodes
shecodes.io › athena › 65300-what-is-the-difference-between-bind-call-and-apply-in-javascript
[JavaScript] - What is the difference between bind, call, and apply in JavaScript?
Learn how to use bind, call, and apply in JavaScript to set the value of this in a function and call the function with a given this value.
🌐
freeCodeCamp
freecodecamp.org › news › the-difference-between-javascripts-call-apply-and-bind-methods-4e69917f77bd
The difference between JavaScript’s call, apply, and bind methods
December 11, 2018 - Way to remember: “Apply accepts arguments as an Array” or “AA” · call**(this [, arg1, arg2...])**: Calls a function with a provided this. Further arguments are provided as a comma separated list · Ways to remember: “Call’s arguments are separated by commas” or “CC”. **bind(this)**: Returns a new function whose this value is bound to the provided value.
🌐
Tania's Website
taniarascia.com › understanding this, bind, call, and apply in javascript
Understanding This, Bind, Call, and Apply in JavaScript | Tania Rascia's Website
In all of the previous examples, the value of this was determined by its context—whether it is global, in an object, in a constructed function or class, or on a DOM event handler. However, using call, apply, or bind, you can explicitly determine what this should refer to.
🌐
W3docs
w3docs.com › javascript
JavaScript: bind() vs apply() and call()
Among these three methods above, bind() works a little bit differently. Unlike call() and apply() that execute the current function immediately, bind() returns a new function.
🌐
Tpiros
tpiros.dev › blog › call-vs-apply-vs-bind
call vs apply vs bind - Tamas Piros
December 8, 2021 - The call(), apply() and bind() methods in JavaScript allow us to change the value of the this keyword.
🌐
Medium
medium.com › @rabailzaheer › exploring-call-apply-and-bind-methods-in-javascript-6023627c7bdc
Exploring Call, Apply, and Bind Methods in JavaScript
September 26, 2023 - In JavaScript, the this keyword refers to the current execution context, often associated with the object that called the function. The behavior of this can be complex and context-dependent. call, apply, and bind provide control over this context:
🌐
CodeBurst
codeburst.io › javascript-under-the-hood-pt-4-bind-call-and-apply-22e2b46b3882
Bind(), Call(), and Apply() In JavaScript | codeburst
October 20, 2020 - To answer this question it’s important to first remember that, in JavaScript, all functions are objects. This means that they can have properties and methods, just like any other object. Functions are a special kind of object in that they come with a variety of built-in properties (having a code property that is invocable, having an optional name, and the three methods call(), apply(), and bind()).