Passing arguments as an array without .apply()
<p>I am try to find out if there is a way to pass arguments to a javascript function as an array, without using the .apply method. The code would look something like this from a user's perspective:</p>

<pre><code>var args = [1, 2, 3, 4];
doSomething(args);
</code></pre>

<p>Note that <code>doSomething()</code> will not always be the same function, so I cannot write it to use an array of arguments. Ideally, this should work for any function, and I guess what I am trying to do is essentially convert an array into an arguments-array-like object. </p>

<p>I was thinking that I may be able to set the functions arguments object like this:</p>

<pre><code>function.arguments = otherArguments;
</code></pre>

<p>But I don't know <em>when</em> I would have to do that (wouldn't I have to somehow do it once the function started executing but before it actually did anything with its arguments?)</p>

<p>The reason I am trying to do this is because I am trying to write my own .apply function for learning purposes. Is this possible?</p>
