Files
8th/exercises/practice/flatten-array/.docs/instructions.md

17 lines
511 B
Markdown
Raw Normal View History

2024-04-29 11:57:31 +02:00
# Instructions
Take a nested array of any depth and return a fully flattened array.
2024-04-29 11:57:31 +02:00
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.
2024-04-29 11:57:31 +02:00
Additionally, the input may be of a different data type and contain different types, depending on the track.
2024-04-29 11:57:31 +02:00
Check the test suite for details.
2024-04-29 11:57:31 +02:00
## Example
input: `[1, [2, 6, null], [[null, [4]], 5]]`
output: `[1, 2, 6, 4, 5]`