Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript .split().reverse.join

"this is a test string".split("").reverse().join("");
//"gnirts tset a si siht"
//as a function
function reverseString(string){
return string.split("").reverse().join("");}
reverseString("test string");
//"gnirts tset"
 
PREVIOUS NEXT
Tagged: #javascript
ADD COMMENT
Topic
Name
5+8 =