Number of n digit numbers that do not contain 9 | function to find number of n digit numbers possible ; Driver code
function totalNumber ( n ) { return 8 * Math . pow ( 9 , n - 1 ) ; } let n = 3 ; document . write ( totalNumber ( n ) ) ;