-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscript.js
65 lines (58 loc) · 1.54 KB
/
script.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
// storing the quiz answers and submit button in a variable
const Mainquiz = document.querySelector(".quiz");
const answers_container = document.querySelector(".answers");
const submit_conatiner = document.querySelector(".submit");
// function for starting the quiz
function startQuiz() {}
// show the results of the quiz
function showResults() {}
const Questions = [
// first question
{
question: "What is the full meaning of JSON",
answers: {
a: "Javascript String Object Notation",
b: "Javascript Object Notation",
c: "Javascript Oriented Notation",
},
correctAnswer: "b",
},
// second question
{
question: "________ Javascript is also called client-side",
answers: {
a: "Native",
b: "Microsoft",
c: "LiveWire",
d: "Navigator",
},
correctAnswer: "d",
},
{
question: "What should appear at the very end of your Javascript?",
answers: {
a: "the </script>",
b: "the <script>",
c: "The End Statement",
d: "None of the Above",
},
correctAnswer: "a",
},
// third question
{
question: "Which of the following can't be done with a Client side",
answers: {
a: "Validating a form",
b: "Sending a form's contents by email",
c: "Storing the form's content to a database file on the server",
d: "None of the above",
},
correctAnswer: "c",
},
// fourth question
{},
];
// start the quiz immediately
startQuiz();
submit_conatiner.addEventListener("click", showResults);
// Questions in the quiz