Skip to content

Instantly share code, notes, and snippets.

@aarohmankad
Created February 25, 2015 18:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aarohmankad/25c1266fd9fc676bf75c to your computer and use it in GitHub Desktop.
Save aarohmankad/25c1266fd9fc676bf75c to your computer and use it in GitHub Desktop.
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