From b2628f8ff34b3d17cfd392ee493efa1d36b9fa88 Mon Sep 17 00:00:00 2001 From: Angelos Chalaris Date: Thu, 11 Jan 2018 10:56:14 +0200 Subject: [PATCH] Update flatten.md --- snippets/flatten.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snippets/flatten.md b/snippets/flatten.md index 2154971a9..63bec4b0d 100644 --- a/snippets/flatten.md +++ b/snippets/flatten.md @@ -5,7 +5,7 @@ Flattens an array up to the specified depth. Use recursion, decrementing `depth` by 1 for each level of depth. Use `Array.reduce()` and `Array.concat()` to merge elements or arrays. Base case, for `depth` equal to `1` stops recursion. -Omit the second element, `depth` to flatten only to a depth of `1` (single flatten). +Omit the second argument, `depth` to flatten only to a depth of `1` (single flatten). ```js const flatten = (arr, depth = 1) =>