title: Hash table and Hash map in javascript
body: <p>Internal representation of a hashtable &amp;&amp; hashmap is,</p>
  
  <h2><a href="https://i.stack.imgur.com/3mu36.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3mu36.png" alt="enter image description here"></a></h2>
  
  <p>In Java, <em>hashtable</em> and <em>hashmap</em> is differentiated in terms of synchronous/asynchronous operation, otherwise internal representation is same.</p>
  
  <p>Javascript object literal notation,</p>
  
  <pre><code>var obj = {
             e1: 1,
             e2: 2,
             e3: 3  
           };
  </code></pre>
  
  <p>can be directly used as hashtable and hashmap with its internal hashing function. Object literal has string or Symbols as keys.</p>
  
  <p>ES6 has also introduced <code>window.Map</code> with any value as keys.</p>
  
  <p>1) Does the above internal representation for hashtable and hashmap, looks correct? (or) Is there a difference in internal represenation of hashtable and hashmap?</p>
  
  <p>2) Does Javascript object literal provide O(1) computation for hashtable/hashmap without any collision?</p>