Skip to content

entries

Subhajit Sahu edited this page Dec 8, 2022 · 12 revisions

List all key-value pairs.

Similar: entries, hasEntry, randomEntry.
Similar: keys, values, entries.


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

var x = {a: 1, b: 2, c: 3};
object.entries(x);
// → [ [ 'a', 1 ], [ 'b', 2 ], [ 'c', 3 ] ]


References

Clone this wiki locally