const reverseStr = (str)=>{
if(!str || 2 > str.length) {
return str
}
let reversedStr = '';
for (let index = str.length - 1; index >= 0; index--) {
reversedStr += str[index];
}
return reversedStr
}
console.log(reverseStr('football'));