阅读背景:

从数组中删除第一个元素并返回数组减去第一个元素

来源:互联网 

var myarray = ["item 1", "item 2", "item 3", "item 4"];

//removes the first element of the array, and returns that element.
alert(myarray.shift());
//alerts "item 1"

//removes the last element of the array, and returns that element.
alert(myarray.pop());
//alerts "item 4"var myarray = ["item 1", "item 2", 



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: