Created
May 11, 2018 21:54
-
-
Save Walkeryr/e4d78f2b9940930d2ec5adb928ad2e44 to your computer and use it in GitHub Desktop.
[Project Euler] Problem 1 — Multiples of 3 and 5.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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