JavaScript: Convert [a,b,c] into [a][b][c]
<p>I have arrays like <code>[a]</code>, <code>[a,b]</code>, <code>[a,b,c]</code> and so on.</p>

<p>How can I convert them into <code>[a]</code>, <code>[a][b]</code>, <code>[a][b][c]</code> and so on?</p>

<p>Example:</p>

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