From c42a4a749a5113f29c7de34ccc7ef7b86cc8c511 Mon Sep 17 00:00:00 2001 From: Bardia Rastin Date: Tue, 8 May 2018 02:41:04 +0430 Subject: [PATCH] fix a small mistake in calling Math.max --- .../02-rest-parameters-spread-operator/article.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1-js/06-advanced-functions/02-rest-parameters-spread-operator/article.md b/1-js/06-advanced-functions/02-rest-parameters-spread-operator/article.md index f1c099a3..fa8c9f1c 100644 --- a/1-js/06-advanced-functions/02-rest-parameters-spread-operator/article.md +++ b/1-js/06-advanced-functions/02-rest-parameters-spread-operator/article.md @@ -145,7 +145,7 @@ alert( Math.max(arr) ); // NaN */!* ``` -And surely we can't manually list items in the code `Math.max(arg[0], arg[1], arg[2])`, because we may be unsure how many there are. As our script executes, there could be a lot, or there could be none. And that would get ugly. +And surely we can't manually list items in the code `Math.max(arr[0], arr[1], arr[2])`, because we may be unsure how many there are. As our script executes, there could be a lot, or there could be none. And that would get ugly. *Spread operator* to the rescue! It looks similar to rest parameters, also using `...`, but does quite the opposite.