Answers for "javascript function to return a string reversed"

60

javascript reverse a string

function reverseString(s){
    return s.split("").reverse().join("");
}
reverseString("Hello");//"olleH"
Posted by: Guest on August-05-2019
2

reverse string js

function reverseString(str) {

    var newString = "";

    for (var i = str.length - 1; i >= 0; i--) { 
        newString += str[i]; 

    return newString;
}
 
reverseString('hello');
Posted by: Guest on January-12-2021

Code answers related to "javascript function to return a string reversed"

Code answers related to "Javascript"

Browse Popular Code Answers by Language