I am creating the map as follows:
var employeeMap = new Object();
addElement(employeeMap , 1, "ABC");
addElement(employeeMap , 2, "ABCD");
alert(getElement(employeeMap,1)); // ABC
function addElement(map,key,value){
map[key] = value;
return map;
}
function getElement(map,key){
return map[key];
}
How to delete a key-value pair from the map ? Is setting the map[key] = null the only option ?
Thanks, Shikha