|
|
|
String.reverse() in javascript
8
Turns any string backwards. If you input "Test" it gives out "tseT". Hope it's useful.
The snippet shows how to use it.
The snippet shows how to use it.
String.prototype.reverse = function(){
splitext = this.split("");
revertext = splitext.reverse();
reversed = revertext.join("");
return reversed;
}
x = new String('This is a test.');
document.write(x.reverse());
Comments
Mon. Oct. 2nd, 2006 9:37 AM
ctiggerf
ctiggerf
Wed. Oct. 4th, 2006 10:19 AM
Thomas
Thomas
Mon. Oct. 23rd, 2006 10:04 PM
dedos
dedos



