What does the `bind()` method do in JavaScript?

JavaScript Associate Medium

JavaScript Associate — Medium

What does the `bind()` method do in JavaScript?

Key points

  • `bind()` returns a new function with a fixed `this` context
  • Arguments can be pre-filled in the new function
  • The original function is not immediately called with `bind()`

Ready to go further?

Related questions