Obtenir le numéro de correspondance JavaScript

var intersections = array1.filter(e => array2.indexOf(e) !== -1);
Restu Wahyu Saputra