2 ms·
The point of constructors in JavaScript was to mirror the "look" of Java. Brendan Eich has mentioned this. You don't technically need them and can use functions
by wturner 11y ago
The point of constructors in JavaScript was to mirror the "look" of Java. Brendan Eich has mentioned this. You don't technically need them and can use functions to return objects.