I wrote short code of inheritance of reader
from Person
:
The difference is that is you further extend the Person class the sub classes will not inherit the getName() method
Edit: I was not correct in above statement. Just tested on the jsfiddle. Regardless of if we define a method on the prototype or on the function instance itself, it is available for the subclasses in the chain.
Here is the proof: http://jsfiddle.net/u8qrd/
I understand that there is a performance/memory benefit of attaching the methods to prototype. Appart from that isn't there any behavioral difference when it comes to inheritance?
(hopefully I'm not violating SO rules by asking a question here)