-
Notifications
You must be signed in to change notification settings - Fork 0
concat
Subhajit Sahu edited this page Feb 4, 2021
·
14 revisions
Appends entries from maps, preferring last. 🏃 📼 📦 🌔 📒
entries.concat(...xs);
// xs: n entries
const entries = require("extra-entries");
var x = [["a", 1], ["b", 2]];
var y = [["c", 3], ["d", 4]];
[...entries.concat(x, y)];
// [ [ "a", 1 ], [ "b", 2 ], [ "c", 3 ], [ "d", 4 ] ]
var z = [["d", 40], ["e", 50]];
[...entries.concat(x, y, z)];
// [ [ "a", 1 ], [ "b", 2 ], [ "c", 3 ], [ "d", 40 ], [ "e", 50 ] ]