2 ms·
Well, constructor functions called without the new operator have disastrous effects. Although that's probably not the prime motivation. There's several differe
by TazeTSchnitzel 15y ago
Well, constructor functions called without the new operator have disastrous effects. Although that's probably not the prime motivation.
There's several different OOP styles in JS, and I quite like this one. Not using prototypes means you can create uncompromisable objects with inheritance.
- stephenr 15y agoIt's fairly trivial to check if a constructor was called without the new operator.