Skip to content

entries

Subhajit Sahu edited this page Feb 3, 2021 · 17 revisions

Lists all index-value pairs. 🏃 📼 📦 🌔 📒

Similar: keys, values, entries.


iterable.entries(x);
// x: an iterable
const iterable = require("extra-iterable");

var x = ["A", "B", "C"];
[...iterable.entries(x)];
// [ [ 0, "A" ], [ 1, "B" ], [ 2, "C" ] ]


References

Clone this wiki locally