Variable as value of array (array[variable])
<p>I'm trying to write a function, which calls a value out of a defined array:</p>

<pre><code>var categories = [];
categories[caller1] = "asasd";
categories[caller2] = "asasd";
categories[caller3] = "asasd";

function getNewItem(caller){
    $("#"+categories[caller]).show();
}
</code></pre>

<p>So the basic problem is, that this doesn't work:</p>

<pre><code>function(VARIABLE){
    $("#"+ categories[VARIABLE]).show();
}
</code></pre>

<p>This code is reduced to the minimum to show the problem.</p>
