Skip to content
Subhajit Sahu edited this page Feb 2, 2021 · 29 revisions

Gets values at indices. 🏃 📼 📦 🌔 📒

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


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

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

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


References

Clone this wiki locally