Tell us what’s happening:
I can’t solve this step , and also I’m having trouble approaching the steps in the project overall…
Your code so far
<!-- file: index.html -->
<!DOCTYPE html>
<html lang='en'
<head>
<meta charset='UTF-8'>
<link href="styles.css" rel="stylesheet"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<title>Palindrome Checker MH</title>
<input id="text-input" type="text"/>
<button id="check-btn"></button>
<div id="result"></div>
<script src="./script.js"></script>
</body>
</html>
/* file: styles.css */
/* file: script.js */
const textInput = document.querySelector('#text-input')
const checkBtn = document.querySelector('#check-btn')
checkBtn.addEventListener('click',noValue);
textInput.addEventListener(onlyA)
function noValue(){ if(textInput.innerContext === null, alert('Please input a value')){
}
}
function onlyA() {
if(cleanInput === A) {
result.innerHTML = "A is a palindrome"
}
}
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36
Challenge Information:
Build a Palindrome Checker Project - Build a Palindrome Checker