var a = [[1,2,3,4], [1,3,6,9], [1,3,9,10]];
function getRep(ar) {
res = [];
ar.forEach(el => {
el.forEach(a => {
res[a] = res[a] ? res[a]+1 : 1;
});
});
out = [];
res.forEach((el, i) => {if (el == ar.length) out.push(i);});
return out;
}
getRep([[1,2,3,4], [1,3,6,9], [1,3,9,10]]); // [1, 3]