@tempots/std
flattenArray() function
Flattens a two-dimensional array into a one-dimensional array.
Signature:
flattenArray: (arr: T[][]) => T[]
Parameters
Parameter |
Type |
Description |
---|---|---|
arr |
T[][] |
The two-dimensional array to flatten. |
Returns: T[]
The flattened one-dimensional array.