From f45e9e070c93ebbd83d488bdd775987a4d75c201 Mon Sep 17 00:00:00 2001 From: t7yang Date: Mon, 10 Jan 2022 08:38:08 +0800 Subject: fix yari h2m dry run errors --- .../web/javascript/reference/functions/arguments/index.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'files/zh-tw/web/javascript/reference/functions/arguments/index.html') diff --git a/files/zh-tw/web/javascript/reference/functions/arguments/index.html b/files/zh-tw/web/javascript/reference/functions/arguments/index.html index ddccefae10..3a670e1f3c 100644 --- a/files/zh-tw/web/javascript/reference/functions/arguments/index.html +++ b/files/zh-tw/web/javascript/reference/functions/arguments/index.html @@ -20,12 +20,12 @@ translation_of: Web/JavaScript/Reference/Functions/arguments

描述

-
-

Note: 如果你有在使用 ES6 語法,建議參考其餘參數

+
+

備註:如果你有在使用 ES6 語法,建議參考其餘參數

-
-

Note: 「類陣列 (Array-like)」 的意思是 arguments 一樣擁有 length這項屬性,以及從 0 開始的索引,但是它沒有陣列內建的方法像是 forEach() ,或是 map() 。

+
+

備註:「類陣列 (Array-like)」 的意思是 arguments 一樣擁有 length這項屬性,以及從 0 開始的索引,但是它沒有陣列內建的方法像是 forEach() ,或是 map() 。

The arguments object is a local variable available within all (non-arrow) functions. You can refer to a function's arguments within the function by using the arguments object. This object contains an entry for each argument passed to the function, the first entry's index starting at 0.

@@ -52,8 +52,8 @@ var args = [].slice.call(arguments); const args = Array.from(arguments); -
-

Using slice on arguments prevents optimizations in some JavaScript engines (V8 for example - more information). If you care for them, try constructing a new array by iterating through the arguments object instead. An alternative would be to use the despised Array constructor as a function:

+
+

警告:Using slice on arguments prevents optimizations in some JavaScript engines (V8 for example - more information). If you care for them, try constructing a new array by iterating through the arguments object instead. An alternative would be to use the despised Array constructor as a function:

var args = (arguments.length === 1 ? [arguments[0]] : Array.apply(null, arguments));
-- cgit v1.2.3-54-g00ecf