Найти совпадения в двух массивах
const intersection = array1.filter(element => array2.includes(element));
Lonely Loris
const intersection = array1.filter(element => array2.includes(element));