Shifting an array with less touches
You can just use concat and splice..

shift %= array.length;
array = array.concat(array.splice(0,shift));


Or if you want the same array referance you can shift and push

for(i = 0; i &lt; shift; i ++){
   var item = array.shift();
   array.push(item);
}


or shorten to 

while((shift--) &gt; 0){
   array.push(array.shift());
}