Hi,

My solution for Pairwise challenge passes all tests in Scratchpad(Firefox) but fails at `pairwise([1, 1, 1], 2)`

in FCC.

Did I hit a bug, or am I missing something?

```
function pairwise(arr, arg) {
let used = new Array(arg).fill(false);
let pairsAndSum = [];
for (let i=0; i<arr.length; ++i) {
if (! used[i])
for (let j=i+1; j<arr.length; ++j)
if ((! used[j]) && (arr[i]+arr[j] == arg)) {
pairsAndSum.push([arr[i],arr[j],i+j]);
used[i] = used[j] = true;
break;
}
}
let uniques = [];
pairsAndSum.forEach(e => {
let i;
for (i=0; i<uniques.length; ++i)
if (uniques[i][0] == e[0] && uniques[i][1] == e[1])
if (uniques[i][2] > e[2]) {
uniques[i][2] = e[2];
break;
}
if (i == uniques.length)
uniques.push(e);
});
let sum=0;
for (let s of uniques)
sum += s[2];
return sum;
}
```