title: Javascript constructor method returning something different than expected
body: <pre><code>function Plant() {
    this.country = "Mexico"
    this.isOrganic = true;
  }
  
  function Fruit(fName, fColor) {
    this.name = fName;
    this.color = fColor;
  }
  
  Fruit.prototype = new Plant();
  
  var abanana = new Fruit("Banana", "Yellow")
  console.log(abanana.constructor)
  </code></pre>
  
  <p>So in my code, I was trying to play around with prototype inheritance. Each time I created a new instance of Fruit (var aFruit = new Fruit ()), the new instance’s prototype is assigned the prototype from the Fruit constructor, which is Fruit.prototype.</p>
  
  <p>So why is abanana.constructor 
  not </p>
  
  <pre><code>[function: Fruit] 
  </code></pre>
  
  <p>but </p>
  
  <pre><code>[function: Plant]?
  </code></pre>
  
  <p>I thought this was what the constructor method does:</p>
  
  <blockquote>
    <p>Moreover, all objects that inherit from another object also inherit a constructor property. And this constructor property is simply a property (like any variable) that holds or points to the constructor of the object.</p>
  </blockquote>