Skip to content
wolfram77 edited this page Apr 14, 2020 · 29 revisions

Gets value at index. 🏃 📼 📦 🌔

Alternatives: one, all.

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, -1);
// 8

references

Clone this wiki locally