title: Checking for JSON key without hasOwnProperty
body: <p>I have a basic JSON key-value object, nothing nested. I don't see the point of using hasOwnProperty if the following does not throw an error in any browser. Can someone point out why this is safe, unsafe, or poor vs acceptable practice?</p>
  
  <p>This is an example to set a default IF the input is blank or the property (key) doesn't exist.</p>
  
  <p>without...</p>
  
  <pre><code>var config_arr = {key1:"val",key2:"val",key3:"val",default:"default val"};
  var key = ""; //get value from user input, url param, route path, etc
  var assign_val = (config_arr[key]?config_arr[key]:config_arr.default); 
  </code></pre>
  
  <p>with...</p>
  
  <pre><code>var config_arr = {key1:"val",key2:"val",key3:"val",default:"default val"};
  var key = ""; //get value from user input, url param, route path, etc
  var assign_val = (config_arr.hasOwnProperty(key)?config_arr[key]:config_arr.default);
  </code></pre>
  
  <p>What's wrong with using the first technique and is either of these more efficient?</p>