Update the character
if ( ( S [ i ] . charCodeAt ( 0 ) ) + add <= ( ' ' ) . charCodeAt ( 0 ) ) S [ i ] = String . fromCharCode ( ( S [ i ] . charCodeAt ( 0 ) ) + add ) ; else { add = ( ( S [ i ] . charCodeAt ( 0 ) ) + add ) - ( ( ' ' ) . charCodeAt ( 0 ) ) ; S [ i ] = String . fromCharCode ( ( ' ' . charCodeAt ( 0 ) ) + add - 1 ) ; } }