You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit bbdb520
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: 1-js/06-advanced-functions/02-rest-parameters-spread-operator/article.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,7 @@ alert( sum(1, 2, 3, 4, 5) );
25
25
26
26
There will be no error because of "excessive" arguments. But of course in the result only the first two will be counted.
27
27
28
-
The rest parameters can be mentioned in a function definition with three dots `...`. They literally mean "gather the remaining parameters into an array".
28
+
The rest of the parameters can be included in the function definition by using three dots `...` followed by the name of the array that will contain them. The dots literally mean "gather the remaining parameters into an array".
29
29
30
30
For instance, to gather all arguments into array `args`:
0 commit comments