Skip to content

Instantly share code, notes, and snippets.

@kaleb
Created June 28, 2011 01:54
Show Gist options
  • Select an option

  • Save kaleb/1050327 to your computer and use it in GitHub Desktop.

Select an option

Save kaleb/1050327 to your computer and use it in GitHub Desktop.
Project Euler #1
var i = 1000, sum = 0;
while (--i) {
if (!(i % 3 && i % 5)) {
sum += i;
}
}
console.log(sum);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment