Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Solution-1--solution options for reverse bits algorithm js

function reverseString(string) {
       //convert the string to an array
       let array = string.split("");

    //Use the reverse method
    array.reverse()

    //Convert it back to a string and return
    return array.join("")
}
Source by dev.to #
 
PREVIOUS NEXT
Tagged: #options #reverse #bits #algorithm #js
ADD COMMENT
Topic
Name
1+1 =