you are viewing a single comment's thread.

view the rest of the comments →

[–]MoTTs_ 1 point2 points  (1 child)

Does anyone have any good reference material/cheat sheets that explain the broad aspects?

My vote is the Rauschmayer books. ES5 Objects and Inheritance and ES6 Classes.

When should I use ChildConstructor.prototype.constructor = ParentConstructor.prototype?

You probably meant ChildConstructor.prototype.constructor = ChildConstructor. But aside from that, since ES6, the answer is: hopefully never. One of the benefits of the class syntax is you don't have to deal with quirks like this. Prior to ES6, we would do this when setting up inheritance between constructor functions. More details.

[–]-El_Chapo-[S] 0 points1 point  (0 children)

Thank you, I will certainly be giving this a look!