|
|
|
|
|
by danShumway
2998 days ago
|
|
Both options will break mixins. function CatDog () {
Cat.apply(this, arguments);
}
CatDog.prototype = Object.assign(Dog.prototype, Cat.prototype);
In the above example, CatDog is not an instance of Cat, since it never actually inherits from the Cat prototype. |
|