-
Notifications
You must be signed in to change notification settings - Fork 0
remove
Subhajit Sahu edited this page Dec 22, 2022
·
14 revisions
Remove value at key.
function remove(x, k)
// x: ientries
// k: key
const ientries = require('extra-ientries');
var x = [["a", 2], ["b", 4], ["c", 6], ["d", 8]];
[...ientries.remove(x, "b")];
// → [ [ "a", 2 ], [ "c", 6 ], [ "d", 8 ] ]
[...ientries.remove(x, "d")];
// → [ [ "a", 2 ], [ "b", 4 ], [ "c", 6 ] ]