const isContains = (...a) => {
const [a1, a2] = a.map(a =>[a].flat());
return a1.some(v => a2.includes(v));
}
console.log(isContains(1, 1));
console.log(isContains(1, 2));
console.log(isContains([1, 2], [5, 1]));
console.log(isContains([1, 2], [5, 3]));