摘要: Array.prototype.remove = function(el){ return this.splice(this.indexOf(el),1); } var arr = [1,2,3,4,5]; arr.remove(4); console.log(arr);//[1,2,3,5] var array = [1,2,3,4,5]; array.splice(2,1... 阅读全文
posted @ 2014-12-30 16:20 YYDaddy 阅读(168) 评论(0) 推荐(0) 编辑