Course lesson

Hard-Bind a Function's this Value with the .bind() Method

The Function.prototype.bind() method lets us permanently tie a function's this argument to a specific value. It creates a new bound function that calls the original function with the provided this argument, no matter how that bound function is called.

Duration
3 min
Access
Pro
Transcript
Available

The Function.prototype.bind() method lets us permanently tie a function's this argument to a specific value. It creates a new bound function that calls the original function with the provided this argument, no matter how that bound function is called.

In this lesson we'll see how to use the bind() method. To better understand how it works, we'll implement a naive version of bind() ourselves.