function getPossibleNums(rowAbcentNums, columnAbcentNums, squareAbcentNums) {
const resArr = [];
const counts = {};
const allAbcentNumbers = [...rowAbcentNums, ...columnAbcentNums, ...squareAbcentNums];
 
for (const num of allAbcentNumbers) {
counts[num] = counts[num] === undefined ? 1 : counts[num] + 1;
}
console.log(counts)
 
for (const numKey in counts) {
if (counts[numKey] > 2) {
resArr.push(+numKey);
}
}
 
return resArr;
}
 
console.log(getPossibleNums([1, 2, 3, 4], [4, 3, 5, 6, 9], [8,4, 9, 1, 3]));
 
Code will run automatically after changes.
Code runs in an isolated environment.