Skip to content
Subhajit Sahu edited this page Jun 28, 2020 · 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