Function concatIterables

  • Combines multiple iterables into a single iterable.

    Time complexity: O(n)

    Space complexity: O(n)

    Type Parameters

    • T

    Parameters

    • ...iterables: readonly Iterable<T>[]

      The iterables to combine

    Returns Iterable<T>

    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]