if hashtable contains key code example Example: javascript hashtable contains key if (obj.hasOwnProperty("key1")) { ... }