Being able to reverse a string is a useful skill and is often asked during programming related job interviews.
reverse() method, or Array.prototype.reverse(), can reverse an array in place however.
We will convert the string to an array using the split() method. The
split() method splits a
String object into an array of strings by separating the string into substrings.