Flattens a nested array into a single-level array.
The type of array elements.
The nested array to flatten.
A new flattened array.
flatten([1, [2, [3, 4]], 5]); // [1, 2, [3, 4], 5] Copy
flatten([1, [2, [3, 4]], 5]); // [1, 2, [3, 4], 5]
Flattens a nested array into a single-level array.