function findAllOccurrences(arr, target) {
let posArr = [];
arr.forEach((item, index) => {
if (item === target) {
posArr.push(index);
}
})
return posArr;
}
function findAllOccurrences(arr, target) {
let posArr = [];
arr.forEach((item, index) => {
if (item === target) {
posArr.push(index);
}
})
return posArr;
}