Different ways to prototype but which one is preferred?
<p>I am studying JavaScript's prototype behavior and see a lot of different usages which confuses me. Let's say we have the following constructor functions and prototype definitions. </p>

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

Mammal.prototype.says = function (  ) {
   return this.saying || '';
};

Mammal.prototype.getName = function (  ) {
   return this.name;
};

function Cat(name) {
   this.name = name; //another maybe better way could be Mammal.call(this, name); results in the same
   this.saying = "meow";
}

Cat.prototype = new Mammal();

Cat.prototype.purr = function() {
   return "rrrrrrr";
};
</code></pre>

<p>I've seen this kind of examples a lot on the web and in books but it doesn't feel like this is the proper way of doing it. The first problem I have with it, is that the Mammal constructor is called without it's arguments (which are obvious unknown at this point). As a result of that the name property of the new constructed Mammal object is undefined (see image below). </p>

<p><img src="http://i.stack.imgur.com/SWC8I.png" alt="Example 1"></p>

<p>In my opinion this property shouldn't even be there because is has no use and pollutes the object model. </p>

<p>My question: Is the above example which are used a lot to explain some of JavaScript's prototype behavior the accepted way of doing this or is it preferable to do the following:</p>

<pre><code>Cat.prototype = Object.create(Mammal.prototype);
</code></pre>

<p>Please release me from this burden. Thanks in advance.</p>
