自己写的js方法 1.去掉数组最后一个元素 Array.prototype.noLast = function(){ var len=this.length; this.splice(len-1,1)//改变了原数组 return this }