Skip to content
Advertisement

How to alert user directly after prompt rather than after they answer all three prompts?

I have two questions:

  1. How can I alert the user directly after they answer one question rather than alert them three times after they answer all three questions?
  2. Is there a way for me to keep track of how often the user answers correctly, and give the user a total score at the end of the quiz? don’t need to give me exact code, just a little nudge for where I should be looking πŸ™‚

See below for code:

JavaScript

Advertisement

Answer

JavaScript

Another option is to create a function that creates the numbers for you, so u don’t have to copy-paste the prompts.

JavaScript
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement