自己写的js方法

1.去掉数组最后一个元素

Array.prototype.noLast = function(){
        var len=this.length;
        this.splice(len-1,1)//改变了原数组
        return this
    }
原文地址:https://www.cnblogs.com/rage-the-dream/p/6538672.html