// ideone - Method 1 for reversing a string function reverseString(str){ strRev = ""; for(let i=0; i<str.length; i++){ strRev = str[i] + strRev; } return strRev; } console.log(reverseString("Hello"));