I can not sum indexes of array for the case pairwise( [1,1,1],2). Because indexOf() method only returns first duplicate element indice so I am getting sum of index is 0. How can I solve it?
That’s the challenge
1 Like