Code snippet below gives different output for two instances of same constructor (Child). First object(instance1) is without prototype and second(instance2) is with prototype, why?
parent=function(){
parent.prototype.method1= function() {}
parent.prototype.property = true;
};
child=function() {
parent.call(this);
child.prototype = new parent();
};
(function(){
var instance1 = new child();
console.log( instance1 ); // Empty Object
var instance2 = new child();
console.log( instance2 ); // Object is not empty
}());
Output: