From 09604b58a7a671fcf59f0128f4ae830c47e320ab Mon Sep 17 00:00:00 2001 From: Jia Kim Date: Thu, 11 May 2017 20:49:45 -0400 Subject: [PATCH] Fixed instructions for ES6: Set Default Parameters --- .../02-javascript-algorithms-and-data-structures/es6.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/challenges/02-javascript-algorithms-and-data-structures/es6.json b/challenges/02-javascript-algorithms-and-data-structures/es6.json index deb4d0c82e..eddfbe0234 100644 --- a/challenges/02-javascript-algorithms-and-data-structures/es6.json +++ b/challenges/02-javascript-algorithms-and-data-structures/es6.json @@ -288,7 +288,7 @@ "
function greeting(name = \"Anonymous\") {
return \"Hello \" + name;
}
console.log(greeting(\"John\")); // Hello John
console.log(greeting()); // Hello Anonymous
", "The default parameter kicks in when the argument is not specified (it is undefined). As you can see in the example above, the parameter name will receive its default value \"Anonymous\" when you do not provide a value for the parameter. You can add default values for as many parameters as you want.", "
", - "Modify the function increment by adding default parameters so it will always return a valid number and it will add 1 to number if value is not specified.", + "Modify the function increment by adding default parameters so that it will add 1 to number if value is not specified.", "Note
Don't forget to use strict mode." ], "challengeSeed": [