Javascript - Create instance with array of arguments
<p>I know the possibility to call a function with an array of arguments with apply(obj,args);
Is there a way to use this feature when creating a new instance of a function?</p>

<p>I mean something like this:</p>

<pre><code>function A(arg1,arg2){
    var a = arg1;
    var b = arg2;
}

var a = new A.apply([1,2]); //create new instance using an array of arguments
</code></pre>

<p>I hope you understand what i mean... ^^^</p>

<p>Thanks for your help!</p>

<p><strong>Solved!</strong></p>

<p>I got the right answer. To make the answer fit to my question:</p>

<pre><code>function A(arg1,arg2) {
    var a = arg1;
    var b = arg2;
}

var a = new (A.bind.apply(A,[A,1,2]))();
</code></pre>
