title: Is this a safe way of copying one objects prototype to another?
body: <p>Say I have one object with prototypal properties that I have manually set.</p>
  
  <p>An example would be</p>
  
  <pre><code>function A() {
  
  };
  
  A.prototype.B = function() {
  
  };
  
  A.prototype.C = function() {
  
  };
  
  A.prototype.D = function() {
  
  };
  </code></pre>
  
  <p>How can I extend another object with <code>A</code>'s prototype?</p>
  
  <p>What I have tried is this;</p>
  
  <pre><code>// obj = extend to object
  // obj2 inherit from object
  
  for (var prop in obj2.prototype) {
              if (obj2.prototype.hasOwnProperty(prop)) {
                  obj.prototype[prop] = obj2.prototype[prop];
              }
          }
  </code></pre>
  
  <p>Does using <code>obj2.hasOwnProperty(prop)</code> ensure that only the properties that are on <code>A</code>'s prototype that I have will get copied?</p>
  
  <p>Is there a better way of doing this?</p>