prefixed Array. to reduce(), sort(), map() methods in snippets.
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
### Deep flatten array
|
||||
|
||||
Use recursion.
|
||||
Use `reduce()` to get all elements that are not arrays, flatten each element that is an array.
|
||||
Use `Array.reduce()` to get all elements that are not arrays, flatten each element that is an array.
|
||||
|
||||
```js
|
||||
const deepFlatten = arr =>
|
||||
|
||||
Reference in New Issue
Block a user