Skip to content

entries

Subhajit Sahu edited this page May 3, 2023 · 12 revisions

Obtain all index-value pairs.

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


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

var x = ['A', 'B', 'C'];
xarray.entries(x);
// → [ [ 0, 'A' ], [ 1, 'B' ], [ 2, 'C' ] ]


References

Clone this wiki locally