Who do you simulate Java-type inheritance in JavaScript? Draw some Visio diagrams to explain it.
Anónimo
The right answer is to take the parent constructor (let's say it's called parent) and call it in the child and then set the child's prototype equal to parent. function child(){ parent.apply(this, arguments); } child.prototype=parent;