Skip to content

ientries

Subhajit Sahu edited this page May 3, 2023 · 1 revision

List all index-value pairs.

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


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

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


References

Clone this wiki locally