Removes any value associated to the key and returns the value that Map.prototype.has(key) would have previously returned. Map.prototype.has(key) will return false afterwards.
Key − key of the element to be removed from the Map.
Returns true if the element exited and was removed; else it returns false.
var myMap = new Map(); myMap.set("id", "admin"); myMap.set("pass", "admin@123"); console.log(myMap.has("id")); myMap.delete("id"); console.log(myMap.has("id"));