sandbox-js/projectE1.js
2023-01-21 20:28:58 -05:00

10 lines
121 B
JavaScript

let sum = 0;
for (let i = 0; i < 1000; ++i) {
if (i % 3 == 0 || i % 5 == 0) {
sum = sum + i;
}
}
console.log(sum);