Javascript Decrementing For Loop


  • 0
    P
    var reverseString = function(s) {
        var reverse = "";
        for (var i = s.length - 1; i >= 0; i--){
            reverse += s[i];
        }
        return reverse;
    };
    

Log in to reply
 

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