odin-javascript-exercises/09_palindromes/solution/palindromes-solution.js
2022-02-20 14:07:44 -05:00

6 lines
217 B
JavaScript

const palindromes = function (string) {
processedString = string.toLowerCase().replace(/[^a-z]/g, '');
return processedString.split('').reverse().join('') == processedString;
};
module.exports = palindromes;