var device = array("iphone 5","iphone 6","iphone 7","iphone 8");
var device_revise;
for(i=1;i<device.length-1;i++){
device_revise[]=device[i];
}
var device = array("iphone 5","iphone 6","iphone 7");
device.shift();
device.pop();
device.splice(0,1);//remove first
device.splice(device.length-1,1);remove last
device.slice(1,device.length-1)