title: How can I check if a value exists in Map in Javascript?
body: <p>It looks a very easy question but I haven't found it anywhere.</p>
  <p>How can I know If an value exists in a Map?</p>
  <p>For example:</p>
  <pre><code>A = [1,2,3,5,6,7]
  var myMap = new Map();
  for (let i = 0; i &lt; A.length; i++) {
      myMap.set(i,A[i]);
  }
  for (let z = 1; z &lt; Number.MAX_SAFE_INTEGER; z++) {
      console.log(z);
      if(!myMap.hasValue(z)){
          return z;
      }
  }
  </code></pre>
  <p>I want to check if, given one value, this value is on the Hash. Like a &quot;hasValue&quot;.</p>