Find if the sum of two integers is equal to the given value
const verifySum = (arr, total) => { for(let i = 0; i < arr.length ; i++ ){ for(let j = 0 ; j < arr.length; j++) { if (i === j) { continue; } if(total === arr[i] + arr[j]) { return true; } } } return false; } const input = [5, 7, 1, 2, 8, 4, 3]; console.log(verifySum(input, 15));