JS构造函数继承---------直接继承父构造函数的prototype

理解prototype继承之前先理解prototype、__proto__、constructor function Objfather (){        this.role = "父亲"; } console.log(Objfather.prototype)          Objfather.prototype中有两个属性。分别是 constructor和__proto__ constr
相关文章
相关标签/搜索