1
0
mirror of https://github.com/ruanyf/es6tutorial.git synced 2025-05-25 11:12:21 +00:00

Merge branch 'gh-pages' of github.com:ruanyf/es6tutorial into gh-pages

This commit is contained in:
ruanyf 2018-03-15 14:32:33 +08:00
commit 3a79d6799e

View File

@ -357,7 +357,7 @@ function foo() {
} }
``` ```
上面代码中,`querySelectorAll`方法返回的是一个类似数组的对象,可以将这个对象转为真正的数组,再使用`forEach`方法。 上面代码中,`querySelectorAll`方法返回的是一个类似数组的对象,可以将这个对象转为真正的数组,再使用`filter`方法。
只要是部署了 Iterator 接口的数据结构,`Array.from`都能将其转为数组。 只要是部署了 Iterator 接口的数据结构,`Array.from`都能将其转为数组。