Answers for "reverse to string"

2

how to reverse a string

function reverseString(str) {
    return str.split("").reverse().join("");
}
reverseString("hello");
Posted by: Guest on May-13-2020
0

Reverse a string

function reverseString(str) {
    return str.split('').reverse().join('');
}

reverseString('string');    // "gnirts"
Posted by: Guest on June-30-2021
-1

reverse a string

let t = s.chars().rev().collect::<String>();
Posted by: Guest on February-22-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language