Imagine you have the following block of code. function Animal() { this.offspring = []; } function Dog() { } Dog.prototype = new Animal(); Dog.prototype.constructor = Dog; var d1 = new Dog(); var d2 = new Dog(); var pup = new Dog(); d1.offspring....
Markdown supported · ⌘↵ to post
No responses yet.