Simple Javascript reverse function prototyped onto the String Object.

String.prototype.reverse = function(){
    return this.split("").reverse().join("");
}

Usage Example:

var test_string = "reverse this string";
var reversed_string = test_string.reverse();
Share |
Trackback

no comment untill now

Add your comment now