题解 | #查找元素位置#
查找元素位置
http://www.nowcoder.com/practice/0a9af9cb20c34babb6232126e019c74d
{"css":"","js":"function findAllOccurrences(arr, target) {
let a = [];
for(let i = 0;i < arr.length;i++){
if(arr[i] == target){
a.push(i);
}
}
return a;
}","html":"","libs":[]}