Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js how to reverse a string

function reverseString(s){
    return s.split("").reverse().join("");
}
reverseString("Hello");//"olleH"
Source by dev.to #
 
PREVIOUS NEXT
Tagged: #js #reverse #string
ADD COMMENT
Topic
Name
5+4 =