Great idea for a project, and I love the styling! Overall, it’s really well done.
Here are my suggestions for improving your JS:
The keypress listener on line 172: can you simplify this? You’re doing the same comparison over and over. If you ever want to increase the difficulty of the game (so that an answer might be something other than 1-9) this conditional statement is going to take up too many lines of code. Why not ask if
e.which === probAnswer - 48?
Separation of duties: some of your functions are doing a lot of work. Are you familiar with MVC? I won’t go into too much detail, but in this context the idea is that 1 function does math/logical comparisons, 1 function interacts with the DOM, and 1 function triggers other functions to run. Think about your
processing() function. It’s doing all three of those things. Try to write smaller functions that just do 1 task. And make sure they have descriptive names - it should be clear from the name what a function will do without having to read the comments.
Can you retain the functionality of the game without using global variables? Unless you absolutely need them, it’s my understanding that they’re not necessary.