title: Determine if value exists in JavaScript "hash table"
body: <p>I have built a JavaScript object that functions as a hash table.</p>
  
  <pre><code>var hashTable = {}; 
  </code></pre>
  
  <p>The table consists of key value pairs that are manually built. The table will be used to generate a new value based on an old value, or key, in the table.</p>
  
  <pre><code>//hashTable['old_value'] = new_value;
  hashTable['115004568543'] = 115004567503;
  hashTable['115004545983'] = 360000857366;
  hashTable['115004723526'] = 360000865566;
  hashTable['115004723646'] = 360000865566;
  </code></pre>
  
  <p>I have another variable that is compared to the keys in the hash table. If it matches a key in the hash table, then it can be used to capture the new value mapped to it.</p>
  
  <p>For example, let's say some_value is declared. </p>
  
  <pre><code>some_value = '115004568543';
  </code></pre>
  
  <p>Since it matches a key value (or old_value) in the hash table, I can get the new value by calling </p>
  
  <pre><code>var new_value = hashTable[some_value];
  // new_value is going to be equal to 115004567503 due to the mapping above
  </code></pre>
  
  <p>My problem is that I have two different hash tables that "some_value" is being compared against. I want to see if the first value in the hash is present either in the first hash table OR in the second hash table. So I have been working with:</p>
  
  <pre><code>var hashTable = {};
  hashTable['115004568543'] = 115004567503;
  hashTable['115004545983'] = 360000857366;
  
  var hashTable2 = {};
  hashTable2['115004702483'] = 360000857366;
  hashTable2['115004560766'] = 360000857366;
  
  var some_value = '115004545983';
  
  if (hashTable.includes(some_value)) {
      var new_value = hashTable[some_value];
      //Do some other stuff with new_value
  }
  
  else if (hashTableTwo.includes(some_value)) {
      var new_value = hashTableTwo[some_value];
      //Do some other stuff with new_value
  }
  </code></pre>
  
  <p>Additionally, some_value will exist in the first hash table, the second hash table, or not at all. It will not exist multiple times.</p>
  
  <p><strong>MY QUESTION:</strong> I am trying to use hashTable.includes() to see if some_value is present in either of the two hash tables. It isn't working. What is the best way to determine if some_value is a value in one of the hash tables?</p>
  
  <p>When I try to call hashTable.includes(some_value) I get </p>
  
  <pre><code>Uncaught TypeError: hashTable.includes is not a function
  </code></pre>