????????????????function?Animate()?{
????????????this.age?=?12
????????}
????????Animate.prototype?=?{
????????????say()?{
????????????????console.log(this.age)
????????????}
????????}
????????new?Animate().say()
????????function?Dog()?{}
????????Dog.prototype?=?Animate.prototype//?請問這個也可以用Object.create(Animate.prototype),那么用和不用有什么區別嗎,求解
????????let?dog?=?new?Dog()
????????dog.say()
js原型式繼承的一個問題!
HUH函數
2018-07-13 13:23:29