-
Notifications
You must be signed in to change notification settings - Fork 1
getAll
wolfram77 edited this page Mar 27, 2020
·
26 revisions
Gets value at indices (+ve, -ve).
Alternatives: one, all, fractional.
array.getAll(x, is);
// x: an array
// is: indices (-ve: from right)
// --> [...values]
const array = require('extra-array');
var x = [2, 4, 6, 8];
array.getAll(x, [1, 2]);
// [4, 6]
array.getAll(x, [-1, -2]);
// [8, 6]