Skip to content
Subhajit Sahu edited this page Mar 17, 2020 · 29 revisions

Gets value at indices (+ve, -ve).

array.getAll(x, is);
// x:  an array
// is: indices (-ve: from right)
// --> [...values]
const array = require('extra-array');

var a = [2, 4, 6, 8];
array.get(a, 0);
// 2

array.get(a, 1);
// 4

array.get(a, -1);
// 8

references

Clone this wiki locally