Go to my github

indexOf

if(!Array.prototype.indexOf) {
Array.prototype.indexOf = function(obj, start) {
for(var index = (start || 0), j = this.length; index < j; index++) {
if(this[index] === obj) {
return index;
}
}
return -1;
}
}

posted @ 2023-11-14 17:59  峡谷少爷  阅读(6)  评论(0编辑  收藏  举报