flattenDeep
Modified on Fri, 18 Aug 2023
Description
Recursively flatten array.
Syntax
flattenDeep(array)
Parameters
Input Parameter | Type | Description |
---|---|---|
array | Array | The array to flatten. |
Return value
Type |
---|
Array<any> |
Sample
Example | Result | Description |
---|---|---|
flattenDeep([1, [2, [3, [4]], 5]]) | [1, 2, 3, 4, 5] | Returns the new flattened array. |
To view all the List functions, click here.
See Also
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article