Skip to content

Instantly share code, notes, and snippets.

@qodirovshohijahon
Created January 11, 2020 13:56
Show Gist options
  • Save qodirovshohijahon/9d57af7460497d22c2d9f6b8e2244cc8 to your computer and use it in GitHub Desktop.
Save qodirovshohijahon/9d57af7460497d22c2d9f6b8e2244cc8 to your computer and use it in GitHub Desktop.
In this example you can see one of unique way to reverse array elements using recursive functions
function reverseString (str) {
if(str === "") return ""; else
return reverseString(str.substr(1)) + str.charAt(0);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment