Hey Beckett ![]()
The answers are not being recorded because you’re not capturing the answers, why not defining a variable as an object with the questions numbers as its keys and the answers as their values. Example:
let record = {
firstQ: {
answer chosen: // add the value here when answering,
correct: false
}
}
/* Here is a question.
Q1: What's the result of multiplying 2 by 4?
- 5.
- 8.
- 4.
When choosing any answer, run a check (which you already do) and capture the answer. */
let answer = $w('#options').selectedIndex;
record.firstQ.answer = answer;
if (answer === 8) {
record.firstQ.correct = true;
}
And do the state transition as usual.
Now regarding the last slide, I don’t see anything wrong in your code, perhaps because I don’t know what each element ID is. Please add some screenshots with the last state’s elements IDs so I can help further.
Hope this helps!~
Ahmad