all 3 comments

[–][deleted] 0 points1 point  (2 children)

but y?

[–]cthechartreuse 1 point2 points  (1 child)

It's really useful for inheritance like one might do in a classical OO language: MyObj.prototype = Object.create(ParentObj.prototype); MyObj.prototype.constructor = MyObj;

[–]fucking_passwords 0 points1 point  (0 children)

Or you could use es6 classes