27th Dec 2020, 9:14 AM
Akash Agrawal
Akash Agrawal - avatar
+ 5
Antony James You have written outside the function.
27th Dec 2020, 8:56 AM
A͢J
A͢J - avatar
+ 5
Antony James There is lots of mistake in this code so you need to go through JavaScript course again.
27th Dec 2020, 9:05 AM
A͢J
A͢J - avatar
+ 4
Antony James This is not a right way. car( if (car === result) { alert("Correct"); } else { alert("Wrong") } );
27th Dec 2020, 8:57 AM
A͢J
A͢J - avatar
+ 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
27th Dec 2020, 8:40 AM
Krish
Krish - avatar
+ 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
27th Dec 2020, 8:49 AM
Krish
Krish - avatar
+ 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
27th Dec 2020, 9:03 AM
A͢J
A͢J - avatar
+ 3
Yes I Am Groot ! Is correct go through the course once again
27th Dec 2020, 9:07 AM
Krish
Krish - avatar
+ 1
<div id="sample" ></div> Or use inline element like span <span id="sample" ></span > getElementByid. ("sample" )
27th Dec 2020, 6:30 PM
Tafadzwa Chiramba
Tafadzwa Chiramba - avatar
+ 1
Hii
27th Dec 2020, 7:16 PM
Victor Eneh
+ 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.
27th Dec 2020, 11:28 PM
Kieren Hawthorne
Kieren Hawthorne - avatar
+ 1
Your car got wrong parts. It is broken
29th Dec 2020, 5:37 AM
\•/
\•/ - avatar
+ 1
Hey All. How Can I fix launch4j error jRe
29th Dec 2020, 6:24 AM
SAIQA CHANNA
SAIQA CHANNA - avatar