Program to check if a number is divisible by any of its digits | Function to check if given number is divisible by any of its digits ; Check if any of digit divides n ; Check if K divides N ; Driver Code
function isDivisible ( n ) { temp = n ; while ( n ) { k = n % 10 ; if ( temp % k == 0 ) return " " ; n = Math . floor ( n / 10 ) ; } return " " ; } let n = 9876543 ; document . write ( isDivisible ( n ) ) ;