4 ms·
JavaScript object creation: Learning to live without "new"
Discusses object creation in JavaScript using prototypal inheritance as an alternative to the new operator.
- mistercow 15y agoI don't understand why this is considered superior to using `new`. I guess it's supposed to be less confusing to those who try to use JavaScript without understanding it (and hey, we've all been there), but I don't see how it really helps. It doesn't magically make the newcomer understand prototypal inheritance.