From c40612041809fe289aba58aefa170bbe784aba1f Mon Sep 17 00:00:00 2001 From: t7yang Date: Mon, 10 Jan 2022 08:38:07 +0800 Subject: remove name attribute for zh-CN --- .../web/javascript/reference/functions/rest_parameters/index.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'files/zh-cn/web/javascript/reference/functions/rest_parameters') diff --git a/files/zh-cn/web/javascript/reference/functions/rest_parameters/index.html b/files/zh-cn/web/javascript/reference/functions/rest_parameters/index.html index 406552c11c..cf59dc41c9 100644 --- a/files/zh-cn/web/javascript/reference/functions/rest_parameters/index.html +++ b/files/zh-cn/web/javascript/reference/functions/rest_parameters/index.html @@ -77,7 +77,7 @@ f(1) // NaN (b and c are undefined) f(1, 2, 3) // 6 f(1, 2, 3, 4) // 6 (the fourth parameter is not destructured) -

示例

+

示例

因为theArgs是个数组,所以你可以使用length属性得到剩余参数的个数:

@@ -127,7 +127,7 @@ alert(sortArguments(5,3,7,1)); // 抛出TypeError异常:arguments.sort is not a } console.log(sortArguments(5, 3, 7, 1)); // shows 1, 3, 5, 7 -

规范

+

规范

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

{{Compat("javascript.functions.rest_parameters")}}

-

相关链接

+

相关链接