Check if the character is a small letter If yes , then Capitalise
ch [ k ] = String . fromCharCode ( ch [ k ] >= ' ' && ch [ k ] <= ' ' ? ( ch [ k ] . charCodeAt ( 0 ) - 32 ) : ch [ k ] . charCodeAt ( 0 ) ) ; ch [ i - 1 ] = String . fromCharCode ( ch [ i - 1 ] >= ' ' && ch [ i - 1 ] <= ' ' ? ( ch [ i - 1 ] . charCodeAt ( 0 ) - 32 ) : ch [ i - 1 ] . charCodeAt ( 0 ) ) ; } return ch . join ( ' ' ) ; }