run tdd, update test cases for flatten.
This commit is contained in:
@ -16,4 +16,5 @@ const flatten = (arr, depth = 1) =>
|
||||
|
||||
```js
|
||||
flatten([1, [2], 3, 4]); // [1, 2, 3, 4]
|
||||
flatten([1, [2, [3, [4, 5], 6], 7], 8], 2); // [1, 2, 3, [4, 5], 6, 7, 8]
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user