Combines multiple iterables into a single iterable.
Time complexity: O(n)
Space complexity: O(n)
The iterables to combine
A single iterable containing all the elements of all the iterables
Iterable
[...concatIterables([1, 2, 3], [4, 5, 6])]; // [1, 2, 3, 4, 5, 6] Copy
[...concatIterables([1, 2, 3], [4, 5, 6])]; // [1, 2, 3, 4, 5, 6]
Combines multiple iterables into a single iterable.
Time complexity: O(n)
Space complexity: O(n)