Skip to content
Advertisement

How to ask Question 5 Times in Quiz App in JavaScript?

Im working on Quiz Web App. I Just code a simple question.

but now I want To Ask The Question 5 Times.

i tried using for loop and also while loop but its didn’t work.

i used lot off setTimeout functions here,

where user click on start button i want that question ask 5 times and count how many answers are right and how many answers are wrong.

How Can i do That ?

JavaScript

This Is Whole Code.

its looks messy but its working.

Advertisement

Answer

Here is code which works like you expecting:

index.php

JavaScript

additional file i created to establish correct answers: options.php

JavaScript

This code works on my localhost, and produce desired result.

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