Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

append to map javascript

var myMap = {};

myMap[newKey] = newValue;
// ...


// Another method
var myMap = new Map();
myMap.set("key0","value");
// ...
myMap.has("key1"); // evaluates to false, assuming key1 wasn't set
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #append #map #javascript
ADD COMMENT
Topic
Name
9+7 =