Skip to content

Instantly share code, notes, and snippets.

@sheniff
Created May 3, 2015 03:37
Show Gist options
  • Select an option

  • Save sheniff/5248ab2a920196851734 to your computer and use it in GitHub Desktop.

Select an option

Save sheniff/5248ab2a920196851734 to your computer and use it in GitHub Desktop.
Spoiler Alert: Project Euler 1
var sum = 0;
for (var i = 0; i < 1000; i++) {
if(i % 3 === 0 || i % 5 === 0) {
sum += i;
}
}
console.log(sum);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment