Last active
August 29, 2017 21:30
-
-
Save isacjunior/3c0c23a189806e8157213a7a5e779d41 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 numbers = [3, 1, 6] | |
function sumNumbers(numbers) { | |
let result = 0 | |
for(let i = 0; i < numbers.length; i++) { | |
result += numbers[i] | |
} | |
return result | |
} | |
console.log(sumNumbers(numbers)) // 10 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment