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);
};
JavaScript数组添加remove方法
最新推荐文章于 2023-10-18 18:51:24 发布