**Tell us what’s happening:**

some test cases are not passing, here is my solution, please let me know what I’m doing wrong here?

**Your code so far**

```
function pairwise(arr, arg) {
let array = [];
for(let i=0; i<arr.length-1; i++){
for(let j=i+1; j<arr.length; j++){
if(arr[i]+arr[j] === arg)array.push(i,j)
}
}
return array.reduce((a,b)=>a+b,0)
}
pairwise([1,4,2,3,0,5], 7);
```

**Your browser information:**

User Agent is: `Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36`

.

**Challenge:** Pairwise

**Link to the challenge:**

https://www.freecodecamp.org/learn/coding-interview-prep/algorithms/pairwise