Skip to content
Subhajit Sahu edited this page Feb 3, 2021 · 24 revisions

Append values from iterables.

Similar: concat, join.


function concat(...xs)
// xs: iterables
const xiterable = require('extra-iterable');

var x = [1, 2];
var y = [3, 4];
[...xiterable.concat(x, y)];
// → [1, 2, 3, 4]

[...xiterable.concat(x, y, y)];
// → [1, 2, 3, 4, 3, 4]


References

Clone this wiki locally