I tried this function :
var myArray=new Array("1", "2", "3", "4");
var value=myArray.pop();
myArray.push(value);
but I’d like to remove 4 from the end and add it to the beginning.
So should be 4 1 2 3. So a LIFO methodology using push and pop… How can I do it?
1 Answer