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; // 

// ... 
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e86278-db0.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e86278-db0.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?