The constructor function that created the instance object.
For plain Object instances, the initial value is the Object constructor.
Person.prototype.constructor==Person原型对构造函数的引用
Instances of other constructors each inherit the constructor property from their respective Constructor.prototype object.
ConFun.prototype.constructor是prototype对构造函数的引用 可以不用知道原有构造器也能再次创建新实例 实例上的constructor属性是通过原型链查找获得 ConFun.prototype.constructor是函数声明时候的默认属性 如果改变默认原型,从实例上查找constructor的原型链会改变
网友评论