+ 5
What's the problem?
https://code.sololearn.com/WlF1pR0Y75gd/?ref=app Run the code, (wait) click “Start game” btn, write “#Elements” in the input field, which is same as the text in the h2 written above, even after both the texts are same, the alert is saying wrong. See JS line 33.
3 odpowiedzi
+ 4
In this function "checkAns()" you put H2 the correct is H1
var h1 = $(".game h1").text();
if (input == h1)
alert("Correct!");
else
alert("Wrong!");
+ 3
SoloProg it's still not working
https://code.sololearn.com/WA9xwJvrYpBa/?ref=app
+ 1
There is no mistake by just change the way you call the function.
instead of this: function startGame() {
use this: startGame = () => {
instead of this: function checkInputLength() {
use this: checkInputLength = () => {