Array.prototype.remove = function (dx) {
???????????if (isNaN(dx) || dx > this.length) { return false; }
???????????for (var i = 0, n = 0; i < this.length; i++) {
???????????????if (this[i] != this[dx]) {
???????????????????this[n++] = this[i]
???????????????}
???????????}
???????????this.length -= 1
???????}
js 重写集合remove方法
原文地址:https://www.cnblogs.com/jimmyLei/p/9059890.html