n
total
function solution(n) { let total = 0; for (let i = 1; i <= n; ++i) { if (n % i === 0) total += i; } return total; }