function isSentencePalindrome(str: string) {
// Change the string into lowercase and remove all non-alphanumeric characters
str = str.toLowerCase().replace(/[^a-zA-Z0-9]/g, "");
return str === str.split("").reverse().join("");
}
console.log(isSentencePalindrome("Top step's pup's pet spot.") ? "yes" : "no");
/*
run:
"yes"
*/