Created
February 13, 2018 19:46
-
-
Save ahafidi/4e2e85857a6bfba025da42da6c297d8d 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
const palindrome = str => { | |
const s = str.toLowerCase().replace(/[\W_]/g, ''); | |
return s === s.split('').reverse().join(''); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment