Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Devise a function that accepts an arbitrarily-nested array with elements of arbitrary types, and returns a flattened version of it. Do not solve the task using a built-in function that can accomplish the whole task on its own.
- Example:
- flattenList(["This is a string", 1, 2, [3], [4, [5, 6]], [[7]], 8, "[10, 11]"]) // ["This is a string", 1, 2, 3, 4, 5, 6, 7, 8, "[10, 11]"]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement