Number of Digits in a ^ b | function to calculate number of digits in a ^ b ; Driver program
function no_of_digit ( a , b ) { return ( Math . round ( ( b * Math . log10 ( a ) ) + 1 ) ) ; } let a = 2 , b = 100 ; document . write ( " " + no_of_digit ( a , b ) ) ;