From 8d1313c84cc82d81363ed62b75baedb9a65ff2e3 Mon Sep 17 00:00:00 2001 From: Irvin Date: Wed, 16 Feb 2022 02:08:24 +0800 Subject: remove font tag in zh-CN --- .../javascript/reference/global_objects/array/@@iterator/index.html | 2 +- .../web/javascript/reference/global_objects/array/from/index.html | 2 +- .../reference/global_objects/array/tolocalestring/index.html | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'files/zh-cn/web/javascript/reference/global_objects/array') diff --git a/files/zh-cn/web/javascript/reference/global_objects/array/@@iterator/index.html b/files/zh-cn/web/javascript/reference/global_objects/array/@@iterator/index.html index 31fe03d8b1..ee65eecc73 100644 --- a/files/zh-cn/web/javascript/reference/global_objects/array/@@iterator/index.html +++ b/files/zh-cn/web/javascript/reference/global_objects/array/@@iterator/index.html @@ -29,7 +29,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Array/@@iterator

示例

-

使用 for...of 循环进行迭代

+

使用 for...of 循环进行迭代

var arr = ['a', 'b', 'c', 'd', 'e'];
 var eArr = arr[Symbol.iterator]();
diff --git a/files/zh-cn/web/javascript/reference/global_objects/array/from/index.html b/files/zh-cn/web/javascript/reference/global_objects/array/from/index.html
index 28e693f567..8cab100d7c 100644
--- a/files/zh-cn/web/javascript/reference/global_objects/array/from/index.html
+++ b/files/zh-cn/web/javascript/reference/global_objects/array/from/index.html
@@ -49,7 +49,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Array/from
  
  • 可迭代对象(可以获取对象中的元素,如 Map和 Set 等)
  • -

    Array.from() 方法有一个可选参数 mapFn,让你可以在最后生成的数组上再执行一次 {{jsxref("Array.prototype.map", "map")}} 方法后再返回。也就是说 Array.from(obj, mapFn, thisArg) 就相当于 Array.from(obj).map(mapFn, thisArg), 除非创建的不是可用的中间数组。 这对一些数组的子类,typed arrays 来说很重要, 因为中间数组的值在调用 map() 时需要是适当的类型。

    +

    Array.from() 方法有一个可选参数 mapFn,让你可以在最后生成的数组上再执行一次 {{jsxref("Array.prototype.map", "map")}} 方法后再返回。也就是说 Array.from(obj, mapFn, thisArg) 就相当于 Array.from(obj).map(mapFn, thisArg), 除非创建的不是可用的中间数组。 这对一些数组的子类,typed arrays 来说很重要, 因为中间数组的值在调用 map() 时需要是适当的类型。

    from()length 属性为 1 ,即 Array.from.length === 1

    diff --git a/files/zh-cn/web/javascript/reference/global_objects/array/tolocalestring/index.html b/files/zh-cn/web/javascript/reference/global_objects/array/tolocalestring/index.html index 38b9c01c94..729e537627 100644 --- a/files/zh-cn/web/javascript/reference/global_objects/array/tolocalestring/index.html +++ b/files/zh-cn/web/javascript/reference/global_objects/array/tolocalestring/index.html @@ -15,9 +15,9 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Array/toLocaleString

    语法

    -
    arr.toLocaleString([locales[,options]]);
    +
    arr.toLocaleString([locales[,options]]);
    -

    参数

    +

    参数

    locales {{optional_inline}}
    @@ -26,7 +26,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Array/toLocaleString
    一个可配置属性的对象,对于数字 {{jsxref("Number.prototype.toLocaleString()")}},对于日期{{jsxref("Date.prototype.toLocaleString()")}}.
    -

    返回值

    +

    返回值

    表示数组元素的字符串。

    -- cgit v1.2.3-54-g00ecf