DEV Community

Discussion on: [JavaScript] 7 OOP fundamentals you will need!

Collapse
 
ericdecol profile image
punk croc • Edited

Please try not to use constructors, since they are badly scalable, just imagine if you object grows and suddently you have to adjust you constructor in 18 different places. Rather use the BUILDER pattern for that, nothing will break changes only where needed. Just as when passing multiple arguments through parameter, build an object that contains those (and in the future, more or less) variables.

Collapse
 
yumatsushima07 profile image
Yuma-Tsushima

Good point!!