Reza Hasani 3 months ago committed by GitHub
parent 48d99e2dad
commit 23712d24b5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 5
      src/data/roadmaps/javascript/content/bind@dbercnxXVTJXMpYSDNGb2.md

@ -1,8 +1,9 @@
# bind() # 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: 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) - [@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) - [@article@Javascript Function Bind()](https://www.w3schools.com/js/js_function_bind.asp)
Loading…
Cancel
Save