Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Reverse String in Javascript

function reverseString(str) {
    var newString = "";
    for (var i = str.length - 1; i >= 0; i--) {
        newString += str[i];
    }
    return newString;
}
console.log(reverseString('welcome'));
Source by ideone.com #
 
PREVIOUS NEXT
Tagged: #Reverse #String #Javascript
ADD COMMENT
Topic
Name
3+2 =