In JavaScript, I want to create an object instance (via the new operator), but pass an arbitrary number of arguments to the constructor. Is this possible?
new
This one-liner should do it:
new (Function.prototype.bind.apply(Something, [null].concat(arguments)));