Files
8th/exercises/practice/flatten-array/.docs/instructions.md
2025-07-15 07:50:26 -04:00

511 B

Instructions

Take a nested array of any depth and return a fully flattened array.

Note that some language tracks may include null-like values in the input array, and the way these values are represented varies by track. Such values should be excluded from the flattened array.

Additionally, the input may be of a different data type and contain different types, depending on the track.

Check the test suite for details.

Example

input: [1, [2, 6, null], [[null, [4]], 5]]

output: [1, 2, 6, 4, 5]