+ 3
Antony James Try this code
https://code.sololearn.com/WvwbujL6sUwx/?ref=app
+ 5
Antony James You have written outside the function.
+ 5
Antony James There is lots of mistake in this code so you need to go through JavaScript course again.
+ 4
Antony James This is not a right way.
car(
if (car === result) {
alert("Correct");
}
else {
alert("Wrong")
}
);
+ 3
Antony James your question sounds a but confusion to me so please add the link to the code in the question for getting a help
+ 3
Antony James this link won't work we can access until we sign in
Give the link to a sololearn code
copy and paste your codes here
+ 3
Antony James
Here car is the id of text-box so you can't fill value with innerHTML.
It's wrong
document.getElementById("car").innerHtml
it would be
document.getElementById("car").value
+ 3
Yes I Am Groot ! Is correct go through the course once again
+ 1
<div id="sample" ></div>
Or use inline element like span
<span id="sample" ></span >
getElementByid. ("sample" )
+ 1
Hii
+ 1
I'm just going to add on to the code that Akash Agrawal submitted:
car = () => {
const result = document.querySelector("#car").value;
const lower = result.toLowerCase();
if (lower ==="car"){
alert("Check Correct")} else{
alert("Check Failed")}
} ;
This will turn your users input value to lowercase even if they typed "CaR" your app will still read it as "car" saves you creating an array of words with multiple writing styles for each variation the user might type.
+ 1
Your car got wrong parts. It is broken
+ 1
Hey All.
How Can I fix launch4j error jRe



