9 lines
114 B
JavaScript
9 lines
114 B
JavaScript
|
sum = 0;
|
||
|
i = 0;
|
||
|
for(i=1; i<1000;i++) {
|
||
|
if(i % 3 == 0 || i % 5 == 0) {
|
||
|
sum += i;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
console.log(sum);
|