title: why constructor properties is not inherited to instance of it
body: <pre><code>class Person {
     constructor() {
      let name = 'John';
    }
    talk() {
      return &quot;talking&quot;
   }
  }
  const me = new Person();
  Person.prototype.walk = function walk() { return &quot;walking&quot;; };
  </code></pre>
  <p>as you can see in the image below, why I am getting undefined for <code>me.name</code> (although it was present in the constructor)?</p>
  <p>Why accessible through <code>Person</code> and why not with <code>me</code>?</p>
  <p>Do we get only the prototype object properties to be accessed to me, or do we get constructor properties? If not then what's the use of passing them by default to the me instance as you can see in the image below?</p>
  <p><a href="https://i.stack.imgur.com/OpzT2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OpzT2.png" alt="enter image description here" /></a></p>