Build a Palindrome Checker Project - Build a Palindrome Checker

const textInput = document.getElementById(‘text-input’);
const checkBtn = document.getElementById(‘check-btn’);
const result = document.getElementById(‘result’);

const checkOperation = textInput => {
if (textInput === ‘’) {
alert(‘Please input a value’);
return;
} else {
if (textInput === “A”) {
let result = result.textContent;
result.textContent = ‘A is a palindrome’;
return;
}
}
}

checkBtn.addEventListener(‘click’, () => {
checkOperation(textInput.value);
textInput.value = ‘’;
textInput.value = ‘A’
});

Challenge Information:

Build a Palindrome Checker Project - Build a Palindrome Checker

Hello @freakemo35 !
It’s hard for us to work with your code without knowing where the problem is. Kindly describe your problem to us.

textContent doesn’t display: ‘A is a palindrome’