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 -->
<!doctype html>
<html lang="en">
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="styles.css">
    <h1>Palindrome Checker</h1>
    <input id="text-input" placeholder="Enter your word/sentence">
    <button id="check-btn">Check</button>
    <div id="result">Result:</div>
/* file: styles.css */

h1 {
  padding: 20px;
  margin: auto 100px;
  display: flex;
  justify-content: center
#text-input {
  display: flex;
  justify-content: center;
  align-items: center;
  position: absolute;
  left: 200px

/* file: script.js */
const palindromeInput= document.getElementById("text-input")
const checkBtn = document.getElementById("check-btn")
const result= document.getElementById("result")

function isPalindrome(str) {
  const input = palindromeInput.value
  const cleanedStr = input.replace(/[^a-zA-Z0-9]/g, '').toLowerCase();
  const reversedStr = cleanedStr.split('').reverse().join('')

  if(cleanedStr === reversedStr) {
    result.innerHTML = input + "this is a Palindrome"
  } else {
    result.innerHTML = input + "this is not a Palindrome"


can somoen tell me what im doing wrong ?

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.

Welcome to the forum @kekic.marko

The check button does not have any JavaScript functionality.
Most the the failing tests concern pressing the check button.

Happy coding

I don’t see that you have written any code regarding the button feature. The tests state you need to click the button, so you should assume that feature is required. Review the first lesson in this series to see how to interact with buttons.