Driver code
for ( let i = 0 ; i < MAX ; i ++ ) factors [ i ] = [ ] ; sieveOfEratothenese ( ) ; let arr = [ 8 , 13 , 24 , 36 , 59 , 75 , 91 ] ; for ( let i = 0 ; i < arr . length ; i ++ ) document . write ( sumOfProperDivisors ( arr [ i ] ) + " " ) ; document . write ( " " ) ;