From 1386fed7d38652d5848d315927e7e23a66cffd13 Mon Sep 17 00:00:00 2001 From: Alexey Pyltsyn Date: Wed, 20 Oct 2021 13:28:52 +0300 Subject: [RU] Remove `name` attribute from headings (#2788) --- .../web/javascript/reference/functions/rest_parameters/index.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'files/ru/web/javascript/reference/functions/rest_parameters') diff --git a/files/ru/web/javascript/reference/functions/rest_parameters/index.html b/files/ru/web/javascript/reference/functions/rest_parameters/index.html index 0132e6b5ed..52864c2d93 100644 --- a/files/ru/web/javascript/reference/functions/rest_parameters/index.html +++ b/files/ru/web/javascript/reference/functions/rest_parameters/index.html @@ -13,7 +13,7 @@ translation_of: Web/JavaScript/Reference/Functions/rest_parameters

{{EmbedInteractiveExample("pages/js/functions-restparameters.html")}}

-

Синтаксис

+

Синтаксис

function(a, b, ...theArgs) {
   // ...
@@ -86,7 +86,7 @@ f(1)          // NaN (b и c равны undefined)
 f(1, 2, 3)    // 6
 f(1, 2, 3, 4) // 6 (четвёртый параметр не деструктурирован)
-

Примеры

+

Примеры

В этом примере первый аргумент задан как "a", второй как "b", так что эти аргументы используются как обычно. Однако третий аргумент "manyMoreArgs" будет массивом, который содержит 3-й, 4-й, 5-й, 6-й ... n-й аргументы, которые передаст пользователь.

@@ -197,7 +197,7 @@ console.log(sortArguments(5, 3, 7, 1)); // 1, 3, 5, 7
-

Смотрите также

+

Смотрите также