Well, you can use apply and get an object that looks almost exactly like an instance with such a new one:
function MyClass(a, b, c) {this.foo = a;} var a, b = {}, args = [2, 3, 4];
As you will see, they are equivalent, but if you specify:
console.log('b.constructor === a.constructor', b.constructor === a.constructor);
They do not have the same constructor. This is because b was originally an instance of "Object" because it was installed in the object literal and used as the context for applying the MyClass prototype to the constructor. They will have the same attributes / methods, so maybe this is good enough for your needs?
EDIT: see @Raynos comment below. This method means that you lose everything that is defined using MyClass.prototype.
source share