function sum_divisors(dividend) {
  let result = 1;
  let limit = (1 + Math.round(Math.sqrt(dividend)));
  for(var i = 2; i < limit; i++){
    if(dividend % i === 0){
      result += i;
      if(dividend !== i*i){
        result += (dividend/i);
      }
    }
  }
  return result;
}
//This function will calculate the sum of the divisors of the dividend passed as parameter.
This function will calculate the sum of the divisors of the dividend passed as parameter.
This function will calculate the sum of the divisors of the dividend passed as parameter .
function sum_divisors(dividend) {
  let result = 1;
  let limit = (1 + Math.round(Math.sqrt(dividend)));
  for(var i = 2; i < limit; i++){
    if(dividend % i === 0){
      result += i;
      if(dividend !== i*i){
        result += (dividend/i);
      }
    }
  }
  return result;
}
function sum_divisors ( dividend ) { let result = 1 ; let limit = ( 1 + Math . round ( Math . sqrt ( dividend ) ) ) ; for ( var i = 2 ; i < limit ; i ++ ) { if ( dividend % i === 0 ) { result += i ; if ( dividend !== i * i ) { result += ( dividend / i ) ; } } } return result ; }
This function will calculate the sum of the divisors of the dividend passed as parameter.
This function will calculate the sum of the divisors of the dividend passed as parameter .