Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Reverse string in JS

// ideone - Method 1 for reversing a string
function reverseString(str){
	strRev = "";
 
	for(let i=0; i<str.length; i++){
		strRev = str[i] + strRev;
	}
return strRev;
}
 
console.log(reverseString("Hello"));
Source by ideone.com #
 
PREVIOUS NEXT
Tagged: #Reverse #string #JS
ADD COMMENT
Topic
Name
7+9 =