Debugging details
I set this trivia game to handle run-time errors using
try / catch blocks. For example, if the question data is missing, the code throws a
new Error which is caught and displayed to the user.
Load-time errors were prevented by carefully checking the
syntax before running the code. Logic errors were caught
during manual testing, for instance, I tested every question to make
sure the correct answer pointed to the right option. I also used the
browser console throughout development to
catch errors, especially logic errors. By adding console.error()
inside my catch blocks and console.log() while
testing, I was able to track variables, confirm which functions were
running, and verify that the correct answer matched the intended
option before I submitted the Assignment.