Lower case to upper case | Converts a string to uppercase ; Driver code
function to_upper ( input ) { var result = new Array ( input . length ) ; for ( var i = 0 ; i < input . length ; i ++ ) if ( " " . charCodeAt ( 0 ) <= input [ i ] . charCodeAt ( 0 ) <= " " . charCodeAt ( 0 ) ) result [ i ] = String . fromCharCode ( input [ i ] . charCodeAt ( 0 ) - " " . charCodeAt ( 0 ) + " " . charCodeAt ( 0 ) ) ; return result . join ( " " ) . toString ( ) ; } var str = " " ; document . write ( to_upper ( str ) ) ;