Smallest odd number with N digits | Function to return smallest odd with n digits ; Driver Code
function smallestOdd ( n ) { if ( n == 1 ) return 1 ; return Math . pow ( 10 , n - 1 ) + 1 ; } var n = 4 ; document . write ( smallestOdd ( n ) ) ;