+ 1

Please help me with a quiz in HTML!

I created a quiz but I have problems associating the answer's id with the strings. https://code.sololearn.com/WBpjGz0IUlab/?ref=app

20th Feb 2018, 9:25 AM
Andrea Saccone
Andrea Saccone - avatar
3 Respostas
+ 2
Yo dude, not sure if this is entirely what you were asking but if you replace line 33 with the below code, it'll test if the correct box is checked and, if so, return true, printing "right". No arrays needed 🏋️: if (document.getElementById("first").checked){alert("right");}
20th Feb 2018, 10:00 AM
Alex Mozeak
Alex Mozeak - avatar
+ 1
@Alex Mozeak, you're the man. Sometimes solutions are simple solutions! I've just complicated my life in doing this ahahaha THANK YOU!
20th Feb 2018, 11:00 AM
Andrea Saccone
Andrea Saccone - avatar
0
Not a problem!
20th Feb 2018, 1:33 PM
Alex Mozeak
Alex Mozeak - avatar