// find dublicate indexes let dublIndexes = [] arr.forEach((e, i, a) => { if (a.indexOf(e) !== i) dublIndexes.push(i) })