Go ProSign in

This Lesson is for Members

Subscribe today and get access to all lessons! Plus direct HD download for offline use, enhances transcripts, member comment forums, and iTunes "podcast" RSS feed. Level up your skills now!

Unlock This Lesson

Already subscribed? Sign In

Understand JavaScript's this Keyword in Depth

Understand JavaScript's this Keyword in Depth

Autoplay

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

    Marius SchulzMarius Schulz
    2:31

    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.

    You must be a Member to view code