Created
February 12, 2016 11:44
-
-
Save srkama/a17bdae11fab43f95118 to your computer and use it in GitHub Desktop.
simple program to check string is palindrome or not
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
| //Write your code below this line. | |
| function reverse(s){ | |
| return s.split("").reverse().join(""); | |
| } | |
| for(var i of my_array) { | |
| if (i == reverse(i)) | |
| { | |
| console.log(i); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment