JavaScript数组增添remove方法

JavaScript数组添加remove方法Array.prototype.remove function(from, to) {var rest this.slice((to

JavaScript数组添加remove方法

Array.prototype.remove = function(from, to) {         var rest = this.slice((to || from) + 1 || this.length);         this.length = from < 0 ? this.length + from : from;           return this.push.apply(this, rest);   };