**Tell us what’s happening:**

Hi,

After a couple of hours struggling with this one I finally got it right but the line of code that was missing which is: " arr[i] = arr[j] = NaN; " I cannot understand how works, can you help me please?

**Your code so far**

```
var sum = 0;
for (var i=0; i < arr.length - 1; i++) {
for (var j=i+1; j < arr.length; j++) {
if (arr[i] + arr[j] === arg) {
sum += i + j;
arr[i] = arr[j] = NaN;
}
}
}
return sum;
}
pairwise([1, 1, 1], 2);```
**Your browser information:**
Your Browser User Agent is: ```Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Safari/537.36```.
**Link to the challenge:**
https://www.freecodecamp.org/challenges/pairwise
```