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

Get value at key.

Similar: get, getAll, getPath.
Similar: get, set, remove.


function get(x, k)
// x: a map
// k: key
const map = require('extra-map');

var x = new Map([['a', 2], ['b', 4], ['c', 6], ['d', 8]]);
map.get(x, 'b');
// → 4

map.get(x, 'd');
// → 8


References

Clone this wiki locally