title: Duplicate if condition checking in for(let x in y)?
body: <p>I see below code. And I just want to check if <code>item.hasOwnProperty(key)</code> is not helpful at all? My reason is that because we use <code>for (let in)</code>, so we get every key in the object, and we do not need to check if this key is in the object. Am I right?</p>
  
  <pre><code>public convertObjectKeyToArray(item) {
                  let array = [];
                  for (let key in item) {
                      if (item.hasOwnProperty(key)) {
                          arr.push(key);
                      }
                  }
                  return array;
              }
  </code></pre>