im here again, seeking for help

Look at this code:

```
function pairwise(arr, arg) {
return arr.reduce(function(acc, next, index, array){
for (var i = index + 1; i<arr.length; i++); {
if(array[index] + array[i] === arg) {
acc += index + i;
array[index] = array[i] = NaN;
}
}
return acc;
}, 0);
}
pairwise([1,4,2,3,0,5], 7);
```

THE RESULT IS 11âŚI was told, that for loops stops, when the IF statement is true, so in this case 3+4 = 7 ,which is true, so how come the loop continues to loop?

Here is the case, when it stops looping:

```
function findElement(arr, func) {
for (i = 0; i < arr.length; i++) {
if (func(arr[i])) {
return arr[i];
}
}
}
findElement([1, 2, 3, 4], function(num){ return num % 2 === 0; });
```

THE RESULT IS 4