title: Proper use of Class Inheritance Javascript OOP
body: <p>There seems to be some problem on my syntax but I don't know what seems to be the problem.</p>
  
  <p>I am using prototyping inheritance (if I'm not mistaken)</p>
  
  <p>The program should be like this:</p>
  
  <ul>
  <li>The class must inherit the features of the parent, so when I call on the function it will display some text.</li>
  </ul>
  
  <p>Here is what my code looks like:</p>
  
  <pre><code>function myFunction() {
  
      var Property = function(dom,height,width){
  
          this.dom = document.createElement("img");
          this.height = height;
          this.width = width;
  
          };
  
      Property.prototype.display = function() {
  
      text("The image has: ", this.height+200, this.width+200);
      };
  
      Image.prototype = Object.create(Property.prototype)
  
      var firstImage = function(dom,height,width){
          Property.call(this, dom, height,width);
      };
  
      var image1 = new Image("image.jpg", 10 , 10);
      image1.display();
  }
  </code></pre>