I try to use code from this Move an array element from one array position to another to move arrays position
But why when i will move last to first so I get a empty array
i do like this…
my_array.move(my_array_length,0);
Demo : http://jsfiddle.net/Jsu7R/
Since javascript arrays are indexed from 0 upwards, your code:
will need to change to :
The length of your array has 5 elements, but the last element has an index of 4.