title: How to check whether a Javascript object has a value for a given key?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/135448/how-do-i-check-to-see-if-an-object-has-an-attribute-in-javascript">How do I check to see if an object has an attribute in Javascript?</a>  </p>
  </blockquote>
  
  
  
  <p>I have a Javascript object defined as following:</p>
  
  <pre><code>var mmap = new Object();
  
  mmap['Q'] = 1;
  mmap['Z'] = 0;
  mmap['L'] = 7;
  ...
  </code></pre>
  
  <p>How to check whether this map has a value for a given key (for example 'X')? Does <code>.hasOwnProperty()</code> get into play?</p>