Deleting of an item, indexing problem...
<pre><code>for (var i = 0; i &lt; max; i++) {
   deleteButton[i].addEventListener('click', function (e) {
                    AddPatientVitalsModel.globalData.splice(i, 1);
    });
}
</code></pre>

<p>When i click on a button, a new table is added... i change some information in table and again add another table... and i delete this table... but the array value does delete the first index alone.</p>

<p>The Value of <strong>i</strong> is always zero and it deletes the first item in the Array. How can i ensure that for each table it has different ID.</p>

<p>For each click i feel so that i value always starts from Zero.... </p>
