Array.prototype.push
Array.prototype.pop
Array.prototype.unshift
Array.prototype.shift
javascript中,数组特别灵活,可以从2头操作。
把Array尾部作为栈顶(最常用)
push
pop
把Array头部作为栈顶
unshift
shift
把Array头作为队头(最常用)
把Array尾作为队头
There was an error while loading. Please reload this page.