Skip to content
Subhajit Sahu edited this page Feb 2, 2021 · 29 revisions

Gets value at index. 🏃 📼 📦 🌔 📒

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


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

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

array.get(x, 3);
// 8


References

Clone this wiki locally