|
|
|
|
|
by dkrvt
4010 days ago
|
|
I'm curious as I haven't found a good coding style guide about object inheritance in ES5. I usually write this even though it's a bit verbose: function Child() {
Parent.call(this);
}
Child.prototype = Object.create(Parent.prototype);
Child.prototype.constructor = Child;
Any opinion on this or link to a good guide? |
|