<script>function HashMap(){this.map = {};}HashMap.prototype = { put : function(key, value){ this.map[key] = value;}, get : function(key){ if(this.map.hasOwnProperty(key)){ return this.map[key];} return null; }, remove : function(key){ if(this.map.ha…