Created
December 9, 2016 05:35
-
-
Save gkucmierz/78ef64793afcd1bdda20e7bc36170a74 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const flatten = arr => arr.reduce((res, el) => [...res, ...(Array.isArray(el) && flatten(el) || [el])], []) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment