Flattens an array of elements by recursively traversing the array and concatenating any nested arrays found.
The array to be flattened.
console.log(flattenArray([1, 2, [3, 4]])); // [1, 2, 3, 4] Copy
console.log(flattenArray([1, 2, [3, 4]])); // [1, 2, 3, 4]
Generated using TypeDoc
Flattens an array of elements by recursively traversing the array and concatenating any nested arrays found.