-
-
Save ecaepsey/3fff8c19b0a3f3e88d209470e3c85d61 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const findSum = (arr, val) => { | |
for (let i = 0; i < arr.length; i++) { | |
for (let j = 0; j < arr.length; j++) { | |
if (i !== j && arr[i] + arr[j] === val) { | |
return true; | |
}; | |
}; | |
}; | |
return false; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment