Skip to content

Instantly share code, notes, and snippets.

@mythicalprogrammer
Created May 8, 2013 21:11
Show Gist options
  • Save mythicalprogrammer/5543698 to your computer and use it in GitHub Desktop.
Save mythicalprogrammer/5543698 to your computer and use it in GitHub Desktop.
Javascript Euler Problem #1
var total = 0;
for (var i = 1; i < 1001; i++ ) {
if (i%3 === 0 || i%5 === 0) {
total += i;
}
}
console.log(total);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment