-
Notifications
You must be signed in to change notification settings - Fork 5
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]
var s = new Set([5, 6]);
array.concat$(a, s, s);
// [
// 1, 2, 3, 4,
// 5, 6, 5, 6
// ]
a;
// [
// 1, 2, 3, 4,
// 5, 6, 5, 6
// ]