Build a Palindrome Checker Project - Build a Palindrome Checker

Tell us what’s happening:

Describe your issue in detail here.

Your code so far

<!-- file: index.html -->
<input id="text-input"></input>

<div id="result"></div>

/* file: styles.css */

/* file: script.js */
const chkBtn = document.getElemetById('check-btn')
const txtInput
 = document.getElemetById('text-input').value;

 chkBtn.addEventListener("click", function(){
   alert (txtInput.value)
   txtInput.value = 'Please input a value'


Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/ Safari/537.36

Challenge Information:

Build a Palindrome Checker Project - Build a Palindrome Checker

You appear to have created this post without editing the template. Please edit your post to Tell us what’s happening in your own words.

Hi @Rimon_Gayed

The button code is spanning several lines. Just needs a little tidying up.

The code should be on one line. Also you have a typo.

The script file is not linked to the html.

What did you do to debug your code?

Describe the issue in your own words. Learning to communicate problems is a part of becoming a web developer.

Happy coding