JS. Making quiz grader (doesn't add up) | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 4

JS. Making quiz grader (doesn't add up)

This is a little different from the other quiz question: So I got this code that's supposed to grade a quiz (multiple choice); What i did was_ If the answer (Aresult, B..., C... is checked, Areault = 1; else (A... = 0); Bresult = 1; else (B... = 0); CResult = 1; else (C... = 0); Then Add those up: Var TOTAL = Aresult + Bresult + CResult Button.innerHML = Total ✔️; But it doesn't add up, the button is just 0; How do u fix that ? https://code.sololearn.com/W7J0taDK5qLI/?ref=app

5th Aug 2019, 6:29 AM
Ginfio
Ginfio - avatar
3 Answers
+ 4
Nice attempt 1. Logic flow 1. a. adding after click button 1. b. output after adding 2. typo in var name for Q2 options. Try. If still cannot, see my fix for you. https://code.sololearn.com/W4tj00BwRas9/?ref=app I have numbered my comments, read from 1 to 7.
5th Aug 2019, 9:32 PM
Gordon
Gordon - avatar
+ 3
For starters, the total variable is never updated.
5th Aug 2019, 7:15 AM
Sonic
Sonic - avatar
+ 1
Gordon Thanks . That makes sense
5th Aug 2019, 9:34 PM
Ginfio
Ginfio - avatar