Function to find the product of digits of the given number
function getProduct ( n ) { let product = 1 ; while ( n != 0 ) { product = product * ( n % 10 ) ; n = Math . floor ( n / 10 ) ; } return product ; }