Swap the case of a string in JavaScript