// Creating a Map in JavaScriptlet myMap = newMap();
// Adding elements to the mapmyMap.set('key1', 'value1');
myMap.set('key2', 'value2');
// Accessing elements from the mapconsole.log(myMap.get('key1')); // Output: value1// Checking if key exists in the mapconsole.log(myMap.has('key2')); // Output: true// Deleting an element from the mapmyMap.delete('key1');
// Getting the size of the mapconsole.log(myMap.size); // Output: 1// Clearing the mapmyMap.clear();