From ef618348fe0735e8947d45d8f5ad6b918ba88dec Mon Sep 17 00:00:00 2001 From: Muhammad Najib Bala <45116287+NAJIB-B@users.noreply.github.com> Date: Sun, 2 Oct 2022 12:53:54 +0100 Subject: [PATCH] Add content for function borrowing * added link to mdn docs for rest parameter * Added links to MDN documentation for default parameters, rest parameters and function parameters * added rest parameter MDN Docs following guide lines * Added MDN Docs links to rest and default parameters in function parameters * Update content/roadmaps/106-javascript/content/109-javascript-functions/101-function-parameters/100-default-params.md * Update content/roadmaps/106-javascript/content/109-javascript-functions/101-function-parameters/100-default-params.md * Update content/roadmaps/106-javascript/content/109-javascript-functions/101-function-parameters/101-rest-params.md * Update readme.md * Added link to article on function borrowing * Update content/roadmaps/106-javascript/content/111-javascript-this-keyword/100-function-borrowing.md Co-authored-by: Kamran Ahmed --- .../111-javascript-this-keyword/100-function-borrowing.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/content/roadmaps/106-javascript/content/111-javascript-this-keyword/100-function-borrowing.md b/content/roadmaps/106-javascript/content/111-javascript-this-keyword/100-function-borrowing.md index 896e56c23..d84e74173 100644 --- a/content/roadmaps/106-javascript/content/111-javascript-this-keyword/100-function-borrowing.md +++ b/content/roadmaps/106-javascript/content/111-javascript-this-keyword/100-function-borrowing.md @@ -1 +1,5 @@ -# Function borrowing \ No newline at end of file +# 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. + +Function borrowing