Flattens all depths of a nested array.
The type of elements within the array.
The array to flatten.
A new array that has been flattened.
const arr = flattenDeep([1, [2, [3]], [4, [5, 6]]]);// Returns: [1, 2, 3, 4, 5, 6] Copy
const arr = flattenDeep([1, [2, [3]], [4, [5, 6]]]);// Returns: [1, 2, 3, 4, 5, 6]
Alias