题解 | #js-位置查找#
js-位置查找
http://www.nowcoder.com/practice/6b1df62175ef45dfba4d0a1561836b0a
function _indexof(array,value) {
for(let i = 0; i < array.length; i++){
if(array[i] === value) return i;
}
return -1;
}
js-位置查找
http://www.nowcoder.com/practice/6b1df62175ef45dfba4d0a1561836b0a
function _indexof(array,value) {
for(let i = 0; i < array.length; i++){
if(array[i] === value) return i;
}
return -1;
}
相关推荐