Skip to content

Instantly share code, notes, and snippets.

@acauamontiel
Created July 24, 2014 12:37
Show Gist options
  • Save acauamontiel/86004024ef6545c944a1 to your computer and use it in GitHub Desktop.
Save acauamontiel/86004024ef6545c944a1 to your computer and use it in GitHub Desktop.
Project Euler problems solved using JavaScript
/*
* Problem 1
* http://projecteuler.net/problem=1
*/
for (var i = sum = 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