Smallest N digit number divisible by N | Function to find the smallest N - digit number divisible by N ; Return the smallest N - digit number calculated using above formula ; Given N ; Function Call
function smallestNumber ( N ) { return N * Math . ceil ( Math . pow ( 10 , ( N - 1 ) ) / N ) ; } let N = 2 ; document . write ( smallestNumber ( N ) ) ;