Merge pull request #219 from tunsmart/solutions

Improve the readability of the RegExp
This commit is contained in:
Tatiana 2022-01-30 10:28:53 -08:00 committed by GitHub
commit db998d7279
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -1,5 +1,5 @@
const palindromes = function(string) {
processedString = string.toLowerCase().replace(/[^A-Za-z]/g, "");
processedString = string.toLowerCase().replace(/[^a-z]/g, "");
return (
processedString
.split("")