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