javascript splice don't work properly
<p>I want to remove an element from array, but splice method remove all elemts from star index till the end of array.</p>

<p>I have this code:</p>

<pre><code>function basketItemRemove(obj, id) {
...

    if (id == 0)
        tempBasketList.splice(id, id + 1);
    else
        tempBasketList.splice(id, id);
...
}
</code></pre>

<p>I check id 0, because splice don't remove with index 0. Then <code>splice(id, id);</code> properly work only with second element of array, but if element is third or higher then it delete all till the end of array.</p>
