JavaScript prototype issue
<p>Currently, I'm reading 'Object-Oriented JavaScript'.
In addition, I've encountered a hiccup while carrying out an example from the book.</p>

<p>Below is the code sample:</p>

<pre><code>var Dog = function() {
    this.tail = true;
};

var benji = new Dog();
var rusty = new Dog();

Dog.prototype.say = function() { return "Woof!"; };

benji.say();
rusty.say();

Dog.prototype = {
    paws: 4,
    hair: true
};
Dog.prototype.constructor = Dog;

var lucy = new Dog();
lucy.say();
</code></pre>

<p>Essentially, the idea is to have the following work:</p>

<ol>
<li>console.log(lucy.say());</li>
<li>console.log(benji.paws);</li>
<li>The obvious - lucy.say();</li>
</ol>

<p>etc.</p>

<p>Strangely enough, I've copied the example to the 'T', but to no avail.
If anyone could shed some light I'd be more than grateful.</p>

<p>Cheers</p>
