Easy 1 liner functions | Object | 98% fast | JS
Note this.hashset is an empty object not any inbuild hashset\n\n\nvar MyHashSet = function() {\n    this.hashSet={}\n};\n\nMyHashSet.prototype.add = function(ke
***Note*** `this.hashset` is an empty object not any inbuild hashset\n```\n\nvar MyHashSet = function() {\n    this.hashSet={}\n};\n\nMyHashSet.prototype.add = function(key) {\n    this.hashSet[key]=key\n};\n\nMyHashSet.prototype.remove = function(key) {\n    delete this.hashSet[key]\n};\n\nMyHashSet.prototype.contains = function(key) {\n    return key in this.hashSet\n};\n```
['JavaScript']