2022-01-12 14:58:42 -08:00

11 lines
289 B
JavaScript

function palindromeTester() {
let string = prompt("Please enter a string for palindrome testing:");
let phrase = new Phrase(string);
if (phrase.palindrome()) {
alert(`"${phrase.content}" is a palindrome!`);
} else {
alert(`"${phrase.content}" is not a palindrome.`)
}
}