标签:function prot his type dex 删除 prototype func nbsp
Array.prototype.remove = function(val) {
var index = this.indexOf(val);
if(index > -1) {
this.splice(index, 1);
}
};
var arr = [‘1‘,‘2‘,‘3‘];
arr.remove("2") -> arr = [‘1‘,‘3‘];
标签:function prot his type dex 删除 prototype func nbsp
原文地址:http://www.cnblogs.com/mrt-yyy/p/7766823.html