Student.prototype = Object.create(Person.prototype); Student.prototype.constructor = Person
視頻里是 ?Student.prototype.constructor = Person; 而筆記里是Student.prototype.constructor = Student; ?,到底是哪個呢?
視頻里是 ?Student.prototype.constructor = Person; 而筆記里是Student.prototype.constructor = Student; ?,到底是哪個呢?
2016-04-17
舉報
2016-06-27
那你想自己創建的對象是使用哪個構造器就用哪個!但是一般繼承后都是用自己的構造器!
2016-04-18
Student.prototype.constructor = Student 這個。