Favorites

JavaScript Function.prototype.bind() Method

☕
Enjoying this site?

Help keep it running with a small coffee donation. Every bit of support is appreciated!

Buy us a coffee
Function.prototype.bind()
JavaScript Function Instance methodThis method is supported by all modern browsers.
Updated 28th November 2026

The bind() method creates a new function with this permanently set to a given value, and optionally some arguments filled in.

Description

The bind() method returns a new function whose this is permanently set to the given value, no matter how it is called. This matters when passing methods as callbacks, for example to addEventListener() or setTimeout(), where this would otherwise be lost.

Extra arguments are fixed in front of any passed later, which is called partial application. Arrow functions don't have their own this, so they're often used instead of bind() in modern code.

A bound function can't be re-bound: calling bind() again on it has no effect on this, although extra arguments are still added. Each call to bind() creates a new function, so if you need to remove an event listener later, keep a reference to the bound function rather than binding again.

Syntax

func.bind(thisArg)
func.bind(thisArg, arg1, arg2, ...)

Parameters

  • thisArgThe value to use as this when the new function is called.
  • arg1, arg2, ...Optional. Arguments to put before any passed when calling the new function.

Return Value

A new function with this (and any given arguments) fixed.

Example

const counter = {
  count: 0,
  increment() { this.count++; return this.count; },
};
const inc = counter.increment.bind(counter);
inc(); inc();
console.log(counter.count);

const add = (a, b) => a + b;
const addTen = add.bind(null, 10);
console.log(addTen(5));

Browser Support

The following information will show you the current browser support for the Function.prototype.bind() method. Hover over a browser icon to see the version that first introduced support for this method.

This method is supported by all modern browsers.

Desktop

Chrome
Edge
Firefox
Opera
Safari

Tablets & Mobile

Chrome Android
Firefox Android
Opera Android
Safari iOS
Samsung Internet
Android WebView
-
Supported Unknown Not supported
☕
Enjoying this site?

Help keep it running with a small coffee donation. Every bit of support is appreciated!

Buy us a coffee