@mirei/ts-collections
    Preparing search index...

    Function concat

    • Appends the specified iterable to the end of the sequence.

      Type Parameters

      • TElement

        Type of elements within the source iterable.

      Parameters

      • source: Iterable<TElement>

        The source iterable.

      • other: Iterable<TElement>

        Additional elements that are yielded after the current sequence.

      Returns IEnumerable<TElement>

      A sequence containing the elements of the current sequence followed by those from other.

      Enumeration of both sequences is deferred until the result is iterated.

      const numbers1 = [1, 2, 3];
      const numbers2 = [4, 5, 6];
      const concatenated = concat(numbers1, numbers2).toArray();
      console.log(concatenated); // [1, 2, 3, 4, 5, 6]