From 3fda823973bb75774f72eaa237715246cd741e16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Budav=C3=B6lgyi=20B=C3=A1lint?= <37620060+bala92x@users.noreply.github.com> Date: Tue, 16 Oct 2018 05:32:46 +0200 Subject: [PATCH] feature(guide): added usage of default parameters (#19087) When the default parameters are not in the end of the parameters list, they still can be used if you pass 'undefined' arguments. --- .../english/javascript/es6/default-parameters/index.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/client/src/pages/guide/english/javascript/es6/default-parameters/index.md b/client/src/pages/guide/english/javascript/es6/default-parameters/index.md index da482fed8d..34c6a2933d 100644 --- a/client/src/pages/guide/english/javascript/es6/default-parameters/index.md +++ b/client/src/pages/guide/english/javascript/es6/default-parameters/index.md @@ -47,3 +47,9 @@ NotWorkingFunction(20, 30); // 50; ``` Works fine. + +However, if you want to use the default first parameter, you can pass `undefined` as the first argument of the function call. + +``` +NotWorkingFunction(undefined, 30); // 40; +```