Doc for indexOfDifference