var element = ['day','mothh','year'];
element .pop();//will pop
var element = ['day','mothh','year'];
element .splice(element .length-1,1); // remove last
var device = array("iphone 5","iphone 6","iphone 7","iphone 8");
var device_revise;
for(i=0;i<device.length-1;i++){
device_revise[]=device[i];
}