¡@

Home 

javascript Programming Glossary: animal.prototype

Benefits of using `Object.create` for inheritance

http://stackoverflow.com/questions/17392857/benefits-of-using-object-create-for-inheritance

like this var Animal function name this.name name Animal.prototype.print function console.log this.name var Dog function return.. use Object.create approach Dog.prototype Object.create Animal.prototype which also works. What's the benefit of using Object.create.. am I missing something UPDATE Some say that Dog.prototype Animal.prototype can also work. So now I'm totally confused javascript share..

Javascript inheritance: call super-constructor or use prototype chain?

http://stackoverflow.com/questions/4152931/javascript-inheritance-call-super-constructor-or-use-prototype-chain

sub Let's try this function Animal name this.name name Animal.prototype sayMyName function console.log this.getWordsToSay this.name..