js 移除数组中元素

// 移除数组中元素
	Array.prototype.remove = function(val) {
		var index = this.indexOf(val);
		if (index > -1) {
			this.splice(index, 1);
		}
	};

  

posted @ 2021-03-10 09:57  jiaqiq  阅读(84)  评论(0编辑  收藏  举报