You can use :
const intersection = array1.filter(element => array2.includes(element));
2.1m questions
2.1m answers
60 comments
57.0k users