Skip to content

Instantly share code, notes, and snippets.

@johntran
Created December 17, 2017 01:34
Show Gist options
  • Save johntran/83d45625cd6c42c4cd5b9b521835127b to your computer and use it in GitHub Desktop.
Save johntran/83d45625cd6c42c4cd5b9b521835127b to your computer and use it in GitHub Desktop.
/**
https://lodash.com/docs/4.17.4#flattenDeep
Recursively flattens array.
_.flattenDeep([1, [2, [3, [4]], 5]]);
// => [1, 2, 3, 4, 5]
Even if I nest an element 100 levels deep, it should still flatten it.
*/
function flatten(arr){
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment