-
Notifications
You must be signed in to change notification settings - Fork 0
remove
Subhajit Sahu edited this page Jun 17, 2020
·
14 revisions
map.remove(x, k);
// x: a map
// k: key
const map = require('extra-map');
var x = new Map([['a', 2], ['b', 4], ['c', 6], ['d', 8]]);
map.remove(x, 'b');
// Map(3) { 'a' => 2, 'c' => 6, 'd' => 8 }
map.remove(x, 'd');
// Map(3) { 'a' => 2, 'b' => 4, 'c' => 6 }