Skip to content
Subhajit Sahu edited this page May 3, 2023 · 29 revisions

Get value at index.

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


function get(x, i)
// x: an array
// i: index
const xarray = require('extra-array');

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

xarray.get(x, 3);
// → 8


References

Clone this wiki locally