What worries you?
Human.prototype = new Mammal();
alert( Human.prototype.name ); // undefined
alert( Human.prototype.foo ); // undefined
You may consider them different. The reason you are not writing:
Human.prototype = Mammal.prototype;
Mammal , .
var Mammal = function(name, weight) {
this.name = name;
this.weight = weight;
this.somefun = function() {
}
}
, Constructor Chaining:
var Human = function(name,weight,language,location) {
this.language = language;
this.location = location;
Mammal.apply(this, arguments);
}
, ? name weight, Human Human.