Answer questions online? Increase or decrease in data?

clipboard.png
A similar question, I want to know how to deal with the number of correct answers. I originally wanted to declare a variable and then decide to add it when the answer is right, but not if it is wrong. But what is printed is always 0 and 1

.
Feb.26,2021

estimates that you declare variables in the loop, resulting in variable values being constantly reset


the answer upstairs can be very large. If you look at the code, most of the code is that the variable declaration position is not correct


this code, so there is no way to know the problem.


const total = 8; // 
let answered = 0; // 
let succeed = 0; // 

// ... 
Menu