var getString = prompt("Please enter string", "Harry");

function reverseStr(str) {
    var splitString = str.split("");  
    var reverseArray = splitString.reverse(); 
    var joinArray = reverseArray.join("");     
    return joinArray;
}
if(getString.length<=20){
console.log(reverseStr(getString));
}