JavaScript remove array
<p>I tried doing <code>delete weapons[i];</code> but even do when I do <code>weapons.length</code> I still get 1. Even though it should be 0. How do I definitely remove an array from <code>weapons[]</code> array?</p>

<p>I comb over the weapons array by doing this:</p>

<pre><code>        for (var i = 0, setsLen = weapons.length; i &lt; setsLen; ++i ) {

             var searchWeapon = weapons[i].split("|");
             // console.log('['+i+'] &gt;&gt; Weapon ID: ' + searchWeapon[0] + ' | Y: ' + searchWeapon[1] + ' | X: ' + searchWeapon[2]);    
             if (searchWeapon[1] == Y &amp;&amp; searchWeapon[2] == X) { 
                delete weapons[i];
             }           
            }
</code></pre>

<p>and I store each array as <code>3|10|4</code> where <code>3</code> is weapon ID, <code>10</code> is Y, and <code>4</code> is X.</p>
