Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Javascript Constructors and Prototypes.
This is only useful if Mamaml has only methods and no properties which does not happen that often.
>> Cat.prototype.constructor = Cat
I never saw a practical usage of this one :-)
I think these days the standard way of doing inheritance should be -> MyClass.prototype = Object.create(baseClass.prototype)
There are no comments on this comment yet.
This is only useful if Mamaml has only methods and no properties which does not happen that often.
>> Cat.prototype.constructor = Cat
I never saw a practical usage of this one :-)
I think these days the standard way of doing inheritance should be -> MyClass.prototype = Object.create(baseClass.prototype)