Skip to content

concat$

Subhajit Sahu edited this page Mar 13, 2020 · 30 revisions

Appends arrays to the end.

array.concat$(x, ...ys);
// x:  an array (updated)
// ys: arrays to append
const array = require('extra-array');

var a = [1, 2];
array.concat$(a, [3,  4]);
// [1, 2, 3, 4]

a;
// [1, 2, 3, 4]

array.concat$(a, [5], [6]);
// [1, 2, 3, 4, 5, 6]

a;
// [1, 2, 3, 4, 5, 6]
Clone this wiki locally