Created
February 25, 2015 18:48
-
-
Save aarohmankad/25c1266fd9fc676bf75c to your computer and use it in GitHub Desktop.
This file contains 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
function palindrome (str) { | |
return str.toLowerCase().replace(/[^A-Z0-9]/g, "") == str.toLowerCase().replace(/[^A-Z0-9]/g, "").split("").reverse().join(""); | |
} | |
palindrome('Ey$!#E'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment