This commit is contained in:
Angelos Chalaris
2017-12-27 11:02:46 +02:00
parent 37bb271221
commit 3d79413392
45 changed files with 89 additions and 91 deletions

View File

@ -5,6 +5,6 @@ Flattens an array.
Use a new array and concatenate it with the spread input array causing a shallow denesting of any contained arrays.
```js
const flatten = arr => [ ].concat( ...arr );
const flatten = arr => [ ].concat(...arr);
// flatten([1,[2],3,4]) -> [1,2,3,4]
```