why does array.shift skip a value?
<p>I have this function</p>

<pre><code>$(this).each(function(index) {

            arr[index] = ($(this).attr('id'));
            console.log(arr[index]);            

            fullId[index] = "#"+arr.shift();
            console.log(fullId[index]);     
});
</code></pre>

<p>The results I'm expecting are </p>

<pre><code>A
#A
B
#B
C
#C
D
#D
</code></pre>

<p>The actual results are </p>

<pre><code>A
#A
B
Undefined
C
#B
D
Undefined
</code></pre>

<p>Why is this? </p>
