There are many questions regarding Javascript's implementation of inheritance, although I've not found an answer for why prototypes, in all examples and answers I've seen, are declared outside of the "class". Furthermore it seems using this.prototype
can't be used, which seems unintuitive to those from an OOP background.
Is there any difference between:
function AClass() {
AClass.prototype.AMethod = function(parms) { };
}
and
function AClass() { }
AClass.prototype.AMethod = function(parms) { };