+ 5

I am having problems with this code.

For some reason the javascript if else statments aren't working. https://code.sololearn.com/w72Vd8HxFv3y/?ref=app

20th Oct 2018, 5:45 PM
Elijah D
Elijah D - avatar
3 Answers
+ 2
The clue is in your alert window. The alerted word “error” is not centred in the window, suggesting there is some whitespace in your passMatch string. Fix: line 146 var passMatch = div.textContent; -> var passMatch = div.textContent.trim();
21st Oct 2018, 11:56 AM
Russ
Russ - avatar
+ 1
Thanks Russ that fixed it.
23rd Oct 2018, 1:33 PM
Elijah D
Elijah D - avatar
0
but replace document.getElementById("back").style.display = "none"; to document.getElementById("#back").style.display = "none"; ...
21st Oct 2018, 4:10 AM
Royal Falcon
Royal Falcon - avatar