Function to find the factors of first n natural numbers
function findNFactors ( n ) { for ( var i = 1 ; i <= n ; i ++ ) { document . write ( i + " " ) ; for ( var j = 0 ; j < divisor [ i ] . length ; j ++ ) { document . write ( divisor [ i ] [ j ] + " " ) ; } document . write ( " " ) ; } }