Build a Palindrome Checker Project - Build a Palindrome Checker

Tell us what’s happening:

Does it really matter for the colour of the backtick on my palindrome project?

Your code so far

<!-- file: index.html -->

<input id="text-input">
<button id="check-btn">
  <div span id="result">
  <script src= "script.js"></script>
 </body>
 </title>
/* file: styles.css */
const textInput = document.getElementById("text-input"); 
const checkButton = document.getElementById("check-btn"); 
const result = document.getElementById ("result"); 

checkButton.addEventListener("click",() => {
if (textInput.value === "") {
  alert("Please input a value") 
 } else if (textInput.value.length === 1) {
  result.innerText = `${textInput.value} is a palindrome`
}
});
/* file: script.js */

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.1 Safari/605.1.15

Challenge Information:

Build a Palindrome Checker Project - Build a Palindrome Checker

what color are you asking about?

an issue you have is that your javascript is in the css file

Thanks for your help how do I know what’s what{javascript sector and or other sectors?}

the file extension of the file: you write HTML in the *.html file, you write JavaScript in the *.js file, you write CSS in the *.css file

Thanks what affect would it have if I removed my javascript from css?

if you only remove it, nothing. that is all invalid css, and you have not linked the css file in the html file, so nothing is happening anyway

I dunno I think there might be some bugs on your testing platform it’s coming up with errors.

Are you looking into the bugs as we speak?

no, what should I look into? I don’t have a crystal ball, you gave no information

Ok lol I think there’s a fault whilst checking my progress, it’s not updating correctly.

that is not enough info.
Please provide more details

I’m using the right databases but it’s not working.

I still don’t understand, what database?

Separating code into classes, java, css, that kind of thing I. don’t see where I’m going wrong as advised. 'You should move your code from css to javascript page as discussed earlier).

There maybe some errors you need to solve on the assessment phase.

you can get to each file from the buttons
image

Share your code, there is nothing wrong as far as I know

Tell us what’s happening:Preformatted text

Here’s my code as requested there’s nothing Wong with it I’m just fed up of the errors whilst trying to pass this test.

Your code so far

<!-- file: index.html -->
<input id="text-input">
<button id="check-btn">
  <div span id="result">
  <script src= "script.js"></script>
 </body>
 </title>
/* file: script.js */
const textInput = document.getElementById("text-input"); 
const checkButton = document.getElementById("check-btn"); 
const result = document.getElementById ("result"); 

checkButton.addEventListener("click",() => {
if (textInput.value === "") {
  alert("Please input a value") 
 } else if (textInput.value.length === 1) {
  result.innerText = `${textInput.value} is a palindrome`
} else if (textInput.value ===[...textInput.value].reverse().join(("")) {
result.innerText = `${textInput.value} is a palindrome`
}
});
/* file: styles.css */

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.1 Safari/605.1.15

Challenge Information:

Build a Palindrome Checker Project - Build a Palindrome Checker

you have a syntax error, check the console.

The second else if condition is missing a closing )

next you will find that you are not removing the extra characters before checking if your string is a palindrome

also you have some invalid html, remember to use an html validator (here one you can use: The W3C Markup Validation Service)