Created
November 18, 2015 19:18
-
-
Save IAmAnubhavSaini/7001564b9cd0f367c985 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) { | |
var nstr = str.match(/[^\W_]+/gi).map(String.toLowerCase).join(''); | |
console.log(nstr); | |
return nstr === nstr.split('').reverse().join(''); | |
} | |
palindrome("0_0 (: /-\ :) 0-0"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment