- 1

Can you please help me in making a Javascript quiz?

I want to make a dynamic quiz such that each question is displayed one at time with next question appearing on pressing next button, also there is a previous button. at last question there is a submit button on pressing of which the result is displayed with score. Please give me some idea how to make it.

8th Nov 2017, 12:07 PM
Shantanu Shinde
Shantanu Shinde - avatar
8 ответов
+ 5
https://code.sololearn.com/WJ091SORyjV0/?ref=app here is my first attempt at such a thing. it is not the best example, but it is an example 😊
8th Nov 2017, 12:39 PM
jay
jay - avatar
+ 5
yes! that is very possible
8th Nov 2017, 1:44 PM
jay
jay - avatar
+ 5
yes. if you click the js tab in the example I provided you will see how I did it. note: the code actually starts after the comment 'old code' i had started to convert it to use classes but got sidetracked..
8th Nov 2017, 1:52 PM
jay
jay - avatar
+ 1
can I do something like a variable whose value increase on pressing new and decrease on pressing previous. for each value of that variable a question is displayed. and on submit total score counted
8th Nov 2017, 1:43 PM
Shantanu Shinde
Shantanu Shinde - avatar
+ 1
and for display of each question I will need a if else or switch case right? one number for one question
8th Nov 2017, 1:46 PM
Shantanu Shinde
Shantanu Shinde - avatar
0
I just need to know how to store answer input for each question
8th Nov 2017, 1:45 PM
Shantanu Shinde
Shantanu Shinde - avatar
0
how to store that can you tell me
8th Nov 2017, 1:48 PM
Shantanu Shinde
Shantanu Shinde - avatar
0
well that code looks really complicated. can pls comment which part is for storing?
8th Nov 2017, 1:53 PM
Shantanu Shinde
Shantanu Shinde - avatar