I have string like below:
ABCDEFGH
And i want to reverse it like below:
GHEFCDAB
i have tried this:
var str = "ABCDEFGH";
var splitString = str.split("");
var reverseArray = splitString.reverse();
var joinArray = reverseArray.join("");
And return like below:
HGFEDCBA
I Know it wrong, and it just reverse it one way. how to reverse string in javascript with that condition? Many thank before.