Function concatIterables

  • Category

    Combines multiple iterables into a single iterable.

    Time complexity: O(n)

    Space complexity: O(n)

    Type Parameters

    • T

    Parameters

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

      The iterables to combine

    Returns Iterable<T>

    A single iterable containing all the elements of all the iterables

    Iterable

    Example

    [...concatIterables([1, 2, 3], [4, 5, 6])]; // [1, 2, 3, 4, 5, 6]