title: Fixing "Do not access Object.prototype method 'hasOwnProperty' from target object" error
body: <p>Based on <code>hasOwnProperty()</code> method <a href="http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/hasOwnProperty" rel="noreferrer">docs</a> I wrote the following:</p>
  <pre><code>const myObj = {
    prop1: 'val1',
    prop2: 'val2'
  }
  
  if (!myObj.hasOwnProperty('prop3')) {
    myObj.prop3 = 'val3'
  }
  </code></pre>
  <p>But I'm getting this error:</p>
  <blockquote>
  <p>Do not access Object.prototype method 'hasOwnProperty' from target
  object</p>
  </blockquote>
  <p>Why does it not work if it's the same as in the docs, and how to fix it?</p>