const palindromes = function (string) { const reversed = string.split("").reverse().join("").replace(/[\.,?! ]/g, ""); string = string.replace(/[\.,?! ]/g, ""); if (reversed.toLowerCase() === string.toLowerCase()) { return true; } return false; }; // Do not edit below this line module.exports = palindromes;