2 ms·
Dog.prototype = new Animal() This is nonsensical, it is assigning an object instance into a prototype. Dog.prototype = Animal would make sense.
by eurasiantiger 5y ago
Dog.prototype = new Animal()
This is nonsensical, it is assigning an object instance into a prototype.
Dog.prototype = Animal
would make sense.