Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

reverse a string javascript

var s = userInput[0];
var rev = [];
for(let i=0;i<s.length;i++)
{
    rev.push(s[s.length-1-i]);
}
console.log(rev.join(""));
Source by ideone.com #
 
PREVIOUS NEXT
Tagged: #reverse #string #javascript
ADD COMMENT
Topic
Name
3+6 =