Because every javascript object is a basic hashmap that accepts a string or a Symbol as its key, your code may look like this:
var map = {};
// add a item
map[key1] = value1;
// or remove it
delete map[key1];
// or determine whether a key exists
key1 in map;
The javascript object is a true hashmap in its implementation, therefore the search complexity is O(1), but there is no separate hashcode() method for javascript strings; instead, the javascript engine implements it internally (V8, SpiderMonkey, JScript.dll, etc...)