Hacker News new | ask | show | jobs
by Havvy 4234 days ago
But `new` is a bad part. Just an optimized bad part... You could replace every usage of it with `var instance = Object.create(Ctor.prototype);` (and change every `this` to `instance` in your code), and actually explicitly return `instance` -- and then never use `new` again. Your code will become more readable to boot, as there is less action at a distance.
1 comments

Where is the action at a distance when I use new?
The `new` is used at the call site while invisible at the function declaration.