js 原型 原型链

2023-08-09  本文已影响0人  hehehehe

https://zhuanlan.zhihu.com/p/62903507

原型
image.png
function Person(){}

var person = new Person();

person.__proto__ === Person.prototype // true

Person.prototype.constructor === Person // true
原型链
image.png
上一篇 下一篇

猜你喜欢

热点阅读