findIndex(tempArray, value) {
let len = tempArray.length;
let index = 0;
let result = [];
while (index < len) {
index = tempArray.indexOf(value, index);
if (index === -1) {
break;
}
result.push(index);
index += 1;
}
return result;
}
网友评论