docs(array): fix flatMap

This commit is contained in:
ruanyf
2018-08-30 12:19:18 +08:00
parent 50e3e4c53d
commit 37d9896f96
+1 -1
View File
@@ -790,7 +790,7 @@ contains(['foo', 'bar'], 'baz'); // => false
```javascript
// 相当于 [[[2]], [[4]], [[6]], [[8]]].flat()
[1, 2, 3, 4].flatMap(x => [[x * x]])
[1, 2, 3, 4].flatMap(x => [[x * 2]])
// [[2], [4], [6], [8]]
```