title: Module pattern and inheritance
body: <p>I would like to ask whether the following code is one way to implement inheritance using the module pattern. I would be grateful for any advice.</p>
  
  <pre><code>var Parent = (function() {
  
      function construct(x, y) {
          this.x = x || 0;
          this.y = y || 0;
      };
  
      return construct;
  })();
  
  var Child = (function() {
  
      function construct() {
  
      };
  
      construct.prototype = new Parent();
  
      return construct;
  })();
  </code></pre>