181
rated 0 times
[
187]
[
6]
/ answers: 1 / hits: 62038
/ 13 Years ago, sat, december 10, 2011, 12:00:00
In the section about inheritance in the MDN article Introduction to Object Oriented Javascript, I noticed they set the prototype.constructor:
// correct the constructor pointer because it points to Person
Student.prototype.constructor = Student;
Does this serve any important purpose? Is it okay to omit it?
More From » oop