Javascript Solution


  • 0
    L
    var reverseString = function(s) {
        let str = '';
        for(let i = s.length - 1; i >= 0; i--) {
            str+= s.charAt(i);
        }
        return str;
    };
    

Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.