Open this example in the interactive library
Source code
const map = new Map([
["a", 1],
["b", 2],
]);
map.delete("a");
console.log([...map]);
Sample output
[ [ 'b', 2 ] ]

Open this example in the interactive library
const map = new Map([
["a", 1],
["b", 2],
]);
map.delete("a");
console.log([...map]);
[ [ 'b', 2 ] ]