From https://jsfiddle.net/
function reverseString(str) { // 1st split into character array, then reverse the array, then join it back into a string return str.split('').reverse().join(''); } reverseString("hello");