project euler javascript code example
Example: euler 3 and 5 javascript
function multiplesOf3and5(number) { let total = 0; for (let i = 0; i <= number; i++) { if (i % 3 == 0 || i % 5 == 0) { total += i; } } return total;}
function multiplesOf3and5(number) { let total = 0; for (let i = 0; i <= number; i++) { if (i % 3 == 0 || i % 5 == 0) { total += i; } } return total;}