Skip to content

Instantly share code, notes, and snippets.

@NEbere NEbere/reverse.js
Created Feb 11, 2016

Embed
What would you like to do?
Reverse a string in vanilla javascript
function reverseString(str) {
return str.split("").reverse().join("");
}
alert(reverseString("hello"));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.