Skip to content

Glossary: JavaScript Beyond the Basics

bind

Also written: Function.prototype.bind

A method that returns a new function whose `this` is always the object you give it. `cart.total.bind(cart)` fixes the lost-`this` problem when a method is passed as a callback.

Where the book teaches it

Related terms

this