entries - nodef/extra-lists GitHub Wiki

List all key-value pairs.

Similar: keys, values, entries.

function entries(x)
// x: lists
const xlists = require('extra-lists');

var x = ['a', 'b', 'c'], [1, 2, 3](/nodef/extra-lists/wiki/'a',-'b',-'c'],-[1,-2,-3);
[...xlists.entries(x)];
// → [ [ 'a', 1 ], [ 'b', 2 ], [ 'c', 3 ] ]

References