diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/write-arrow-functions-with-parameters.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/write-arrow-functions-with-parameters.md index 3d0316eaf9..782d18851e 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/write-arrow-functions-with-parameters.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/write-arrow-functions-with-parameters.md @@ -12,12 +12,13 @@ Just like a regular function, you can pass arguments into an arrow function. ```js // doubles input value and returns it const doubler = (item) => item * 2; +doubler(4); // returns 8 ``` -If an arrow function has a single argument, the parentheses enclosing the argument may be omitted. +If an arrow function has a single parameter, the parentheses enclosing the parameter may be omitted. ```js -// the same function, without the argument parentheses +// the same function, without the parameter parentheses const doubler = item => item * 2; ``` @@ -26,6 +27,7 @@ It is possible to pass more than one argument into an arrow function. ```js // multiplies the first input value by the second and returns it const multiplier = (item, multi) => item * multi; +multiplier(4, 2); // returns 8 ```