mediumJS ES5#57

Prototype chain lookup

Prompt

Create a Dog constructor that inherits from Animal via the prototype chain. Animal has a breathe method; Dog adds bark. A dog must be instanceof Animal, Animal.prototype must not gain bark, and Dog.prototype.constructor must be repaired.

Hints

Solution

Your Code

5 min

Tests

Click Run to test your code