为了账号安全,请及时绑定邮箱和手机立即绑定

Student.prototype = Object.create(Person.prototype); Student.prototype.constructor = Person

视频里是  Student.prototype.constructor = Person; 而笔记里是Student.prototype.constructor = Student;  ,到底是哪个呢?

正在回答

2 回答

那你想自己创建的对象是使用哪个构造器就用哪个!但是一般继承后都是用自己的构造器!

0 回复 有任何疑惑可以回复我~

Student.prototype.constructor = Student 这个。

0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

Student.prototype = Object.create(Person.prototype); Student.prototype.constructor = Person

我要回答 关注问题
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号