title: obj1 undefined in an algorithm for deep comparison
body: <p>JS CODE:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function deepEqual(obj1, obj2) {
    f = false; //comparison result
    if (Object.keys(obj1).join("") === Object.keys(obj2).join("")) { //checking if properties are equal
      var table = Object.keys(obj1);
      for (let entry of table) {
        console.log("entry",entry); //outputs value  
        console.log("obj1",obj1);
        console.log("obj1.entry",obj1.entry); // why is it undefined(if I write obj1.value it outputs 10)
        if (obj1.entry == obj2.entry) {
          f = true;
        } else {
          f = false;
          break;
        }
      }
    }
    return f;
  }
  
  console.log(deepEqual({value:10},{value:10}));</code></pre>
  </div>
  </div>
  </p>