Last active
November 29, 2016 06:36
-
-
Save umair-khanzada/0526b146cc69b77f44b819d1fc92e844 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //Reverse string in javascript. | |
| var str = "your string"; | |
| str.split('').reverse().join(''); | |
| //using ES6 is more easy. | |
| [...str].reverse().join(''); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment