Skip to content
Subhajit Sahu edited this page May 3, 2023 · 23 revisions

Append values from arrays.

Alternatives: concat, concat$.
Similar: concat, join.


function concat(...xs)
// xs: arrays
const xarray = require('extra-array');

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

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


References

Clone this wiki locally