-
Notifications
You must be signed in to change notification settings - Fork 0
remove
Subhajit Sahu edited this page Jun 18, 2020
·
16 revisions
lists.remove(x, k);
// x: lists
// k: key
const entries = require('extra-entries');
var x = [['a', 2], ['b', 4], ['c', 6], ['d', 8]];
[...entries.remove(x, 'b')];
// [ [ 'a', 2 ], [ 'c', 6 ], [ 'd', 8 ] ]
[...entries.remove(x, 'd')];
// [ [ 'a', 2 ], [ 'b', 4 ], [ 'c', 6 ] ]