ss



This content originally appeared on DEV Community and was authored by Shivam Sahu

function reverseString(str){
    let reversedStr = '';
    for(let i = str.length-1; i>=0; i--){
      reversedStr = reversedStr + str[i];
    }
   return reversedStr;
}

const reversedString = reverseString("shivamsahu");
console.log(reversedString);


This content originally appeared on DEV Community and was authored by Shivam Sahu