Skip to content
wolfram77 edited this page Mar 27, 2020 · 23 revisions

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

Alternatives: one, all, fractional.

array.get(x, i);
// x: an array
// i: index (-ve: from right)
// --> value
const array = require('extra-array');

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

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

references

Clone this wiki locally