Update flatten-array.md

add closing bracket to the comment part
This commit is contained in:
Soorena
2017-12-13 00:56:44 +03:30
committed by GitHub
parent 292411a812
commit 280cefb801

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]
```