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

Obtain all indices.

Alternatives: ikeys, keys.
Similar: keys, values, entries.


function keys(x)
// x: an array
const xarray = require('extra-array');

var x = [1, 2, 3];
xarray.keys(x);
// → [ 0, 1, 2 ]


References

Clone this wiki locally