Handle two digit numbers < 20
else if ( num [ i ] == ' ' ) word += s + two_digits [ num [ i + 1 ] . charCodeAt ( 0 ) - ' ' . charCodeAt ( 0 ) + 1 ] ; else { if ( num [ i ] != ' ' ) word += s + tens_multiple [ num [ i ] . charCodeAt ( 0 ) - ' ' . charCodeAt ( 0 ) ] . substring ( 0 , tens_multiple [ num [ i ] . charCodeAt ( 0 ) - ' ' . charCodeAt ( 0 ) ] . length - 4 ) + " " ; else word += s ; word += single_digits [ num [ i + 1 ] . charCodeAt ( 0 ) - ' ' . charCodeAt ( 0 ) ] ; } i += 2 ; } if ( i == len ) { if ( word . charAt ( 0 ) == ' ' ) word = word . substring ( 1 , word . length ) ; } } return word ; }