关于js原型继承
F.prototype 不就是 A 了么 ..
new F().prototype === (new F()).prototype而不是new (F().prototype),如果是new F.prototype,才是new (F.prototype)。new 是把new F().__proto__指向F.prototype,F(xiàn).prototype = A;你把F.prototype指向了A構(gòu)造器了,所以是有prototype屬性的。new F().prototype === new F().__proto__.prototype
http://bonsaiden.github.io/Ja...
new F().prototype === (new F()).prototype而不是new (F().prototype),如果是new F.prototype,才是new (F.prototype)。new 是把new F().__proto__指向F.prototype,F(xiàn).prototype = A;你把F.prototype指向了A構(gòu)造器了,所以是有prototype屬性的。new F().prototype === new F().__proto__.prototype
http://bonsaiden.github.io/Ja...
總結(jié)
- 上一篇: 迪丽热巴晒露腰对镜拍,jrs觉得如何?
- 下一篇: 想问什么的方做试管婴儿便宜