run tdd, update test cases for flatten.

This commit is contained in:
Stefan Feješ
2018-01-11 09:51:49 +01:00
parent 41001626c7
commit ce4540f71d
3 changed files with 6 additions and 1 deletions

View File

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