Created
July 14, 2016 02:13
-
-
Save anonymous/9f27251e60b3af3a5db6f03f8f54fb6a 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
function sum_even_numbers(){ | |
var sum = 0; | |
for(var x = 1; x < 1001; x++){ | |
if(x % 2 === 0){ | |
sum += x; | |
} | |
} | |
return sum; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment