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