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