mirror of
https://github.com/kamranahmedse/developer-roadmap.git
synced 2025-08-31 21:11:44 +02:00
Update bind@dbercnxXVTJXMpYSDNGb2.md (#6937)
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
# bind()
|
||||
|
||||
The `bind()` method creates a new function with a given `this` value and arguments provided as an array. The original function is not called immediately but can be called later with the `new` keyword or as a normal function call.
|
||||
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.
|
||||
|
||||
Visit the following resources to learn more:
|
||||
|
||||
- [@article@Understanding Explicit Binding in JavaScript: Call, Bind, and Apply Methods](https://medium.com/@amitsharma_24072/understanding-explicit-binding-in-javascript-call-bind-and-apply-methods-7b6ed0107628)
|
||||
- [@article@Javascript Function Bind()](https://www.w3schools.com/js/js_function_bind.asp)
|
||||
- [@official@bind()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind)
|
||||
- [@article@Function binding](https://javascript.info/bind)
|
||||
- [@article@Javascript Function Bind()](https://www.w3schools.com/js/js_function_bind.asp)
|
||||
|
Reference in New Issue
Block a user