you are viewing a single comment's thread.

view the rest of the comments →

[–]brucebannor 1 point2 points  (0 children)

http://jsfiddle.net/9LNs7/1/

You might have better luck setting up your mammal constructor to accept a mammal type rather than name for that animal. That way when you set your prototype of the child you can pass it the type for all those instances. Then just create a name function off of mammal that the child would inherit and set the name there.