Array.prototype.remove删除

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Array.prototype.remove删除相关的知识,希望对你有一定的参考价值。

remove and item or items from array
  1. Array.prototype.remove = function(from, to) {
  2. var rest = this.slice((to || from) + 1 || this.length);
  3. this.length = from < 0 ? this.length + from : from;
  4. return this.push.apply(this, rest);
  5. };

以上是关于Array.prototype.remove删除的主要内容,如果未能解决你的问题,请参考以下文章