0

Like why do we need to construct a constructor pls can anyone help

17th Feb 2016, 10:31 AM
chandrika kadam
chandrika kadam - avatar
1 Réponse
+ 2
Its more of a convenience, documentation and consistency thing. It helps structure your code meaning if you work with many objects and some need to have the same structure (same properties) its easier to remember if you have this object constructor function. It makes those objects more defined. This is especially helpful if you're not the only developer in your team and all of you require some of the same objects. So without these object constructors you might end up having objects that should represent the same but have differently named properties.
23rd Jul 2016, 11:43 AM
MarquisBs
MarquisBs - avatar