-
Notifications
You must be signed in to change notification settings - Fork 1
add
Subhajit Sahu edited this page Dec 2, 2022
·
14 revisions
Add a value to set.
function add(x, v)
// x: a set
// 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 }
set.add(x, 80);
// → Set(5) { 2, 4, 6, 8, 80 }