I prefer the cat method that uses the prototype.
- I'd rather not have all my methods indented one more level inside the contructor.
- I'd rather have the constructor code be just the constructor code rather than lots of other functions - I think it makes it easier to see what you're looking for.
- I'd rather use the prototype so all the methods don't have to be assigned every time the constructor is run.
- It also seems to me like this is why the whole prototype exists, so you can put things on it that future instantiations will inherit automatically without having to run code to assign them.
- Also, if you ever want to do a mix-in, you can get all the methods from the prototype without having to construct one of the objects.
- When you start subclassing, I find the prototype scheme much more understandable.
- I find it easier to search for method definitions because they all include
.prototype.
.