Convert lowercase into uppercase until lower = N / 2
if ( S [ i ] == S [ i ] . toLowerCase ( ) ) { S [ i ] = String . fromCharCode ( S [ i ] . charCodeAt ( ) - 32 ) ; moves ++ ; upper ++ ; lower -- ; }