findIndex方法就是条件如果为true,就会返回当前元素下标,否则就会返回-1
function indexOf(arr, item) {
return arr.findIndex((i,index)=>{
return i == item
})
}