Files

8 lines
625 B
Markdown
Raw Permalink Normal View History

2023-01-02 04:47:46 +04:00
# Function Borrowing
Function borrowing allows us to use the methods of one object on a different object without having to make a copy of that method and maintain it in two separate places. It is accomplished through the use of `.call()`, `.apply()`, or `.bind()`, all of which exist to explicitly set this on the method we are borrowing.
Visit the following resources to learn more:
2024-06-06 23:23:55 +01:00
- [@article@Function borrowing](https://medium.com/@ensallee/function-borrowing-in-javascript-4bd671e9d7b4)
2026-06-12 11:06:50 +02:00
- [@article@When would I use function borrowing](https://stackoverflow.com/questions/69892281/when-would-i-use-function-borrowing)