Created
November 17, 2018 06:13
-
-
Save MacTanomsup/5a32bc369df6f8ea9c1a868f02b7a5e1 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| function sumZero(arr){ | |
| for(let i = 0; i < arr.length; i++){ | |
| for(let j = i+1; j < arr.length; j++){ | |
| if(arr[i] + arr[j] === 0){ | |
| return [arr[i], arr[j]]; | |
| } | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment