Improve the readability of the RegExp

This commit is contained in:
Babatunde Alli 2022-01-28 18:23:16 -05:00
parent 7df108c5de
commit 4b13066369
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("")