pull/6980/head
parent
48d99e2dad
commit
23712d24b5
1 changed files with 4 additions and 3 deletions
@ -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) |
||||
|
Loading…
Reference in new issue