Javascript array index is a var
<p>I'm working on a website with Jquery tabs dynamically generated. Each tab has an ID.</p>

<p>For the purpose of my script I need to know how many times the user has clicked in a tab.</p>

<p>To record the number of clicks I was thinking of doing an array like this:</p>

<pre><code>var i  = new Array(my_tab_id);
(...)
i[my_tab_id] = 0;
</code></pre>

<p>Where my_tab_id dynamically changes depending on the tab we're in. Sadly, it doesn't seem like the value of my_tab_id is translated into the array. I don't have i[5] = 0, i[6] = 0, etc. but rather i[my_tab_id], which doesn't help more than a simple var.</p>

<p>Any advice? Thanks!</p>
