Sorry in advance for the code quality. I’m usually harsh at first in order to get the project done, then I start refining everything.
The code that I commented out are not involved with the problem that I am having.
Here is the demo: https://viridian-guitar.gomix.me/
Here is the code: https://gomix.com/#!/project/viridian-guitar
I am in the process of crating a math game that records your answers via keypress (1-9) and will tell your score in the end after 10 problems.
My problem is that I cannot get my program to transition to the next problem correctly. It works perfectly fine the first time when you log an answer. On the second time, the answer to the problem shows up on the console. The problem on the screen doesn’t change along with it. Answering a third time will only re-iterate the console.log with the same answer as the second.
Let me include an explanation involving images to make my question clearer.
Starts off with a random problem and the answer is logged into the console for testing.
When you hit the right answer it goes to the next problem, and logs the answer to that question in the console.
When you hit the right answer again, the 2nd problem stays on the screen and logs the same answer a second time on the console.
After that, when you hit the same answer multiple times, it will re-iterate that second log on the console.
Thanks for any help for solving this problem.