-
Notifications
You must be signed in to change notification settings - Fork 1
add$
Subhajit Sahu edited this page Dec 2, 2022
·
13 revisions
Add a value to set.
function add$(x, v)
// x: a set (updated)
// v: value
const set = require('extra-set');
var x = new Set([2, 4, 6, 8]);
set.add$(x, 40);
// → Set(5) { 2, 4, 6, 8, 40 }
x;
// → Set(5) { 2, 4, 6, 8, 40 }
var x = new Set([2, 4, 6, 8]);
set.add$(x, 80);
// → Set(5) { 2, 4, 6, 8, 80 }