All ChallengesLoading...
Not Solved

Reverse string in pairs of two

Write a function that takes a string and reverses it in pairs of two characters, leaving the last character if the length is odd.
Intermediate
sample input: "abcdef" 
sample output: badcfe
Loading...
Test Output: