It does exactly this:
function New(constructor) {
// create a new object, with it's prototype set to the constructor's `prototype`
var obj = Object.create(constructor.prototype);
// call the constructor function, with `this` set to the new object
constructor.apply(obj, [].slice.call(arguments, 1));
return obj;
}
thing = New(Thing, 1, 2); // this is the same...
sameThing = new Thing(1, 2); // as thisand that is all. I always had an intuitive sense of what it did, but I could never explicitly enumerate them so simply and without double-checking. Pardon the [].slice.call thing; arguments is a weirdo thing that doesn't have a slice method on itself until ECMAScript 5.
Thanks to Marcus Phillips' training talk at JSConf for finally pounding this into my head.
except when you return an object or function in the constructor that isn't a reference to the newly created instance (which is something you should probably never do but worth being aware of.)