Skip to content

Instantly share code, notes, and snippets.

@Walkeryr
Created May 11, 2018 21:54
Show Gist options
  • Save Walkeryr/e4d78f2b9940930d2ec5adb928ad2e44 to your computer and use it in GitHub Desktop.
Save Walkeryr/e4d78f2b9940930d2ec5adb928ad2e44 to your computer and use it in GitHub Desktop.
[Project Euler] Problem 1 — Multiples of 3 and 5.
let sum = 0;
for (let 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