From 005204e107ec35086db377552f1c92f0758273f2 Mon Sep 17 00:00:00 2001 From: Mustafa Kemal Tuna <12192118+lumosmind@users.noreply.github.com> Date: Tue, 2 Feb 2021 07:03:39 +0300 Subject: [PATCH] conflict with "rest syntax" I think argN represents count of arbitrary parameters. But this syntax looks like "rest syntax". It could be more understandable to change it like this. --- 1-js/02-first-steps/17-arrow-functions-basics/article.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/1-js/02-first-steps/17-arrow-functions-basics/article.md b/1-js/02-first-steps/17-arrow-functions-basics/article.md index e0fb5bda..1b6da9bf 100644 --- a/1-js/02-first-steps/17-arrow-functions-basics/article.md +++ b/1-js/02-first-steps/17-arrow-functions-basics/article.md @@ -5,7 +5,7 @@ There's another very simple and concise syntax for creating functions, that's of It's called "arrow functions", because it looks like this: ```js -let func = (arg1, arg2, ...argN) => expression +let func = (arg1, arg2, ..., argN) => expression ``` ...This creates a function `func` that accepts arguments `arg1..argN`, then evaluates the `expression` on the right side with their use and returns its result. @@ -13,7 +13,7 @@ let func = (arg1, arg2, ...argN) => expression In other words, it's the shorter version of: ```js -let func = function(arg1, arg2, ...argN) { +let func = function(arg1, arg2, ..., argN) { return expression; }; ```