Appends the specified iterable to the end of the sequence.
Type of elements within the source iterable.
source
The source iterable.
Additional elements that are yielded after the current sequence.
A sequence containing the elements of the current sequence followed by those from other.
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] Copy
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]
Appends the specified iterable to the end of the sequence.