Skip to content
Subhajit Sahu edited this page Dec 5, 2022 · 17 revisions

List all values.

Similar: randomValue, hasValue, values.
Similar: keys, values, entries.


function values(x)
// x: a map
const map = require('extra-map');

var x = new Map([['a', 1], ['b', 2], ['c', 3]]);
[...map.values(x)];
// → [ 1, 2, 3 ]


References

Clone this wiki locally