Merge pull request #48 from iamsoorena/master

fixing minor type bug in flatten function
This commit is contained in:
Angelos Chalaris
2017-12-12 23:41:45 +02:00
committed by GitHub

View File

@ -4,5 +4,5 @@ Use `reduce()` to get all elements inside the array and `concat()` to flatten th
```js
const flatten = arr => arr.reduce( (a, v) => a.concat(v), []);
// flatten([1,[2],3,4) -> [1,2,3,4]
// flatten([1,[2],3,4]) -> [1,2,3,4]
```