Javascript swap characters in string. Quick solution: Reusable function I.