From 183c7db94fdad128b376489e117332bd652f5196 Mon Sep 17 00:00:00 2001 From: Muhammad Najib Bala <45116287+NAJIB-B@users.noreply.github.com> Date: Sun, 2 Oct 2022 12:23:31 +0100 Subject: [PATCH] Added MDN Docs links to rest and default parameters readme file following the guidelines (#2002) * 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 Co-authored-by: Kamran Ahmed --- .../101-function-parameters/100-default-params.md | 6 +++++- .../101-function-parameters/101-rest-params.md | 6 +++++- .../101-function-parameters/readme.md | 1 - 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/content/roadmaps/106-javascript/content/109-javascript-functions/101-function-parameters/100-default-params.md b/content/roadmaps/106-javascript/content/109-javascript-functions/101-function-parameters/100-default-params.md index 58a393eff..2800b8dde 100644 --- a/content/roadmaps/106-javascript/content/109-javascript-functions/101-function-parameters/100-default-params.md +++ b/content/roadmaps/106-javascript/content/109-javascript-functions/101-function-parameters/100-default-params.md @@ -1 +1,5 @@ -# Default params \ No newline at end of file +# Default Parameters + +Default function parameters allow named parameters to be initialized with default values if no value or `undefined` is passed. + +Default Parameters - MDN Docs diff --git a/content/roadmaps/106-javascript/content/109-javascript-functions/101-function-parameters/101-rest-params.md b/content/roadmaps/106-javascript/content/109-javascript-functions/101-function-parameters/101-rest-params.md index 41c37ca23..04318e655 100644 --- a/content/roadmaps/106-javascript/content/109-javascript-functions/101-function-parameters/101-rest-params.md +++ b/content/roadmaps/106-javascript/content/109-javascript-functions/101-function-parameters/101-rest-params.md @@ -1 +1,5 @@ -# Rest params \ No newline at end of file +# Rest Parameters + +The rest parameter syntax allows a function to accept an indefinite number of arguments as an array, providing a way to represent [variadic functions](https://en.wikipedia.org/wiki/Variadic_function) in JavaScript. + +Rest Paremeters - MDN Docs diff --git a/content/roadmaps/106-javascript/content/109-javascript-functions/101-function-parameters/readme.md b/content/roadmaps/106-javascript/content/109-javascript-functions/101-function-parameters/readme.md index f2db1b6c8..d0dde10ac 100644 --- a/content/roadmaps/106-javascript/content/109-javascript-functions/101-function-parameters/readme.md +++ b/content/roadmaps/106-javascript/content/109-javascript-functions/101-function-parameters/readme.md @@ -3,4 +3,3 @@ The parameter is the name given to the variable declared inside the definition of a function. There are two special kinds of syntax: default and rest parameters. Function Parameters -