Problem using the prototype chain
<p>If I have a constructor that takes a number of arguments:</p>

<pre><code>var Mammal = function(name, weight) {
    this.name = name;
    this.weight = weight;
}


Mammal.prototype.makeSound = function(sound) {
    alert(sound);
} 

Mammal.prototype.getName = function() {
    return this.name;
}
</code></pre>

<p>and I want to do some inheritence:</p>

<pre><code>var Human = function(name,weight,language,location) {
    //code         
}

Human.prototype = new Mammal();
</code></pre>

<p>In the last line here isn't the Human prototype getting assigned undefined for the name and weight parameters? I see this code all the time....I know that the Human constructor is being fed the name and weight params but it seems messy that the prototype is getting these undefined values. I know this only works because javascript is slack enough to allow you to do this. Is there a way to get round this?</p>
