Skip to content

Instantly share code, notes, and snippets.

@martinpinto
Created February 12, 2015 15:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save martinpinto/71394cd2350245b9e1ab to your computer and use it in GitHub Desktop.
Save martinpinto/71394cd2350245b9e1ab to your computer and use it in GitHub Desktop.
Project Euler Part 1
function multiples() {
var sum = 0;
for (var i = 0; i < 1000; i++) {
if (i % 3 == 0 || i % 5 == 0)
sum += i;
}
return sum;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment