Fix typos
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
|
||||
Use recursion.
|
||||
Use `Array.concat()` with an empty array (`[]`) and the spread operator (`...`) to flatten an array.
|
||||
Rrecursively flatten each element that is an array.
|
||||
Recursively flatten each element that is an array.
|
||||
|
||||
```js
|
||||
const deepFlatten = arr => [].concat(...arr.map(v => Array.isArray(v) ? deepFlatten(v) : v));
|
||||
|
||||
Reference in New Issue
Block a user