Discuss
/
JavaScript
/
使用Object.create 原型继承
使用Object.create 原型继承
Topic sourcePrimaryStudent.prototype.constructor应该指向PrimaryStudent吧
PrimaryStudent.prototype.constructor = PrimaryStudent;
- 1
PrimaryStudent.prototype.constructor应该指向PrimaryStudent吧
PrimaryStudent.prototype.constructor = PrimaryStudent;
拿月亮自刎_
ECMAScript 5 标准 参考: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Inheritance_and_the_prototype_chain