Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

remove key of map

const map1 = new Map();
map1.set('bar', 'foo');

console.log(map1.delete('bar'));
// expected result: true
// (true indicates successful removal)

console.log(map1.has('bar'));
// expected result: false
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #remove #key #map
ADD COMMENT
Topic
Name
8+5 =