Program to print the given digit in words | Function to return the word of the corresponding digit ; Switch block to check for each digit c ; For digit 0 ; For digit 1 ; For digit 2 ; For digit 3 ; For digit 4 ; For digit 5 ; For digit 6 ; For digit 7 ; For digit 8 ; For digit 9 ; Function to iterate through every digit in the given number ; Finding each digit of the number ; Print the digit in words ; Driver code
function printValue ( digit ) { switch ( digit ) { case " " : document . write ( " " ) ; break ; case " " : document . write ( " " ) ; break ; case " " : document . write ( " " ) ; break ; case " " : document . write ( " " ) ; break ; case " " : document . write ( " " ) ; break ; case " " : document . write ( " " ) ; break ; case " " : document . write ( " " ) ; break ; case " " : document . write ( " " ) ; break ; case " " : document . write ( " " ) ; break ; case " " : document . write ( " " ) ; break ; } } function printWord ( N ) { var i , length = N . length ; for ( i = 0 ; i < length ; i ++ ) { printValue ( N [ i ] ) ; } } var N = " " ; printWord ( N ) ;