Last active
April 3, 2019 11:08
-
-
Save dimabory/7f923c249bdfd82a7c202c7ee69c86fb to your computer and use it in GitHub Desktop.
palindrome in the one line
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
const palindrome = str => | |
(s = str.toLowerCase().replace(/[\W_]/g, '')) && | |
s === [...s].reverse().join('') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment