I wrote short code of inheritance of reader
from Person
:
In class-based words the difference between declaring a function via prototype
and this
would be something like this:
prototype:
the function of the instance would look like this:
somefunc = function(){super()/*call the function of the super-class*/};
this:
the function of the instance would look like this:
somefunc = function(){/* Do same stuff as in the prototype func declared */};
Now changing the function on the prototype will have no effect on the instance.