/flatten-array

Primary LanguageJavaScript

Flatten Array

The function flattenArray.js flattens a deeply nested array using a recursive function, checking the if the element in the given array is an array and calling the function again, concatenating the results into an array. A helper function makes sure the flattenArray function parameter is an array.

Tests

npm test