That code from the book is never intended to be run as scripting code within the web browser.
Instead, the >>> markers on the code in the book indicate that you are supposed to explore the code from the scripting console.
Page 23, at the end of the "Variables Are Case-Sensitive" section should help to clear that up for you.
The three consecutive greater-than signs (>>>) show the code that you type, the rest
is the result, as printed in the console. Again, remember that when you see such
code examples, you're strongly encouraged to type in the code yourself and
experiment tweaking it a little here and there, so that you get a better feeling of how
it works exactly.
Here is why lucy.say() fails, from page 163
Any new objects you create from now on will use the updated prototype:
>>> var lucy = new Dog();
[b]TypeError: lucy.say is not a function[/b]
It is supposed to fail, by design.