-
Notifications
You must be signed in to change notification settings - Fork 5
rejectAt
Subhajit Sahu edited this page Jun 20, 2020
·
13 revisions
Discards values at given indices. 🏃 📼 📦 🌔 📒
Similar: map, filter, reject, reduce, accumulate. Alternatives: get, getAll.
Similar: get, set.
array.rejectAt(x, is);
// x: an array
// is: indices
const iterable = require('extra-iterable');
var x = [2, 4, 6, 8];
[...iterable.rejectAt(x, [1, 2])];
// [ 2, 8 ]
[...iterable.rejectAt(x, [1, 3])];
// [ 2, 6 ]