Files

8 lines
696 B
Markdown
Raw Permalink Normal View History

2024-08-30 14:10:33 +05:30
# bind()
The `bind()` method in JavaScript allows you to create a new function with a specific context and optionally preset arguments. Unlike `call()` or `apply()`, `bind()` does not immediately invoke the function. Instead, it returns a new function that can be called later, either as a regular function or with additional arguments. This is particularly useful when you want to ensure that a function retains a specific context, regardless of how or when it's invoked.
2024-08-30 14:10:33 +05:30
Visit the following resources to learn more:
2025-01-01 19:59:08 +09:00
- [@article@bind()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind)
2026-06-12 11:06:50 +02:00
- [@article@Function binding](https://javascript.info/bind)