Zuckerman Numbers | Function to get product of digits ; Function to check if N is an Zuckerman number ; Driver code
function getProduct ( n ) { let product = 1 ; while ( n != 0 ) { product = product * ( n % 10 ) ; n = parseInt ( n / 10 ) ; } return product ; } function isZuckerman ( n ) { return n % getProduct ( n ) == 0 ; } let n = 115 ; if ( isZuckerman ( n ) ) { document . write ( " " ) ; } else { document . write ( " " ) ; }