Skip to content

rejectAt

Subhajit Sahu edited this page Jun 15, 2020 · 10 revisions

Discards the values at given indices. 🏃 📼 📦 🌔 📒

Alternatives: get, getAll.
Similar: get, set.

iterable.rejectAt(x, is);
// x:  an iterable
// is: indices
const iterable = require('extra-iterable');

var x = [2, 4, 6, 8];
[...iterable.getAll(x, [1, 2])];
// [ 4, 6 ]

[...iterable.getAll(x, [1, 3])];
// [ 4, 8 ]

references

Clone this wiki locally