Skip to content
Subhajit Sahu edited this page Feb 3, 2021 · 23 revisions

Get value at index.

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


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

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

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


References

Clone this wiki locally