Les tableaux JS vérifient s'il y a l'intersection

// Use a combination of Array.prototype.filter and Array.prototype.includes:
const filteredArray = array1.filter(value => array2.includes(value));
GutoTrosla