Files
freeCodeCamp/guide/chinese/javascript/standard-objects/array/array-from/index.md

19 lines
471 B
Markdown
Raw Normal View History

---
title: Array from
localeTitle: 数组来自
---
## 数组来自
'Array.from'方法从类似数组或可迭代的对象创建一个新的Array实例。
### 句法:
“”” Array.fromarrayLike \[mapFn \[thisArg\]\] “””
### 例:
“”” Array.from '富'; // \[“f”“o”“o”\] “””
#### 更多信息:
[MDN文档](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/from)