-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdata.js
More file actions
331 lines (330 loc) · 10.1 KB
/
data.js
File metadata and controls
331 lines (330 loc) · 10.1 KB
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
let questionsData = {
html: [
{
question: "Who invented HTML?",
answer_1: "Robbie Williams",
answer_2: "Lady Gaga",
answer_3: "Tim Berners-Lee",
answer_4: "Justin Bieber",
right_answer: 3,
},
{
question: "What does HTML stand for?",
answer_1: "Hyper Text Markup Language",
answer_2: "Home Tool Markup Language",
answer_3: "Hyperlinks and Text Markup Language",
answer_4: "Hyperlinking Text and Metadata Language",
right_answer: 1,
},
{
question: "Which HTML tag is used to define an internal style sheet?",
answer_1: "<style>",
answer_2: "<css>",
answer_3: "<script>",
answer_4: "<link>",
right_answer: 1,
},
{
question: "What is the correct HTML element for inserting a line break?",
answer_1: "<br>",
answer_2: "<lb>",
answer_3: "<break>",
answer_4: "<line>",
right_answer: 1,
},
{
question: "Which character is used to indicate an end tag?",
answer_1: "/",
answer_2: "\\",
answer_3: "^",
answer_4: "~",
right_answer: 1,
},
{
question: "What is the correct HTML element for the largest heading?",
answer_1: "<heading>",
answer_2: "<h1>",
answer_3: "<h6>",
answer_4: "<head>",
right_answer: 2,
},
{
question: "Which HTML attribute specifies an alternate text for an image, if the image cannot be displayed?",
answer_1: "title",
answer_2: "src",
answer_3: "alt",
answer_4: "longdesc",
right_answer: 3,
},
{
question: "How can you make a numbered list?",
answer_1: "<ul>",
answer_2: "<ol>",
answer_3: "<list>",
answer_4: "<dl>",
right_answer: 2,
},
{
question: "Which HTML element defines the title of a document?",
answer_1: "<meta>",
answer_2: "<title>",
answer_3: "<head>",
answer_4: "<document>",
right_answer: 2,
},
{
question: "Which HTML element is used to specify a footer for a document or section?",
answer_1: "<bottom>",
answer_2: "<section>",
answer_3: "<footer>",
answer_4: "<foot>",
right_answer: 3,
}
],
css: [
{
question: "What does CSS stand for?",
answer_1: "Creative Style Sheets",
answer_2: "Cascading Style Sheets",
answer_3: "Computer Style Sheets",
answer_4: "Colorful Style Sheets",
right_answer: 2,
},
{
question: "Which HTML attribute is used to define inline styles?",
answer_1: "style",
answer_2: "class",
answer_3: "styles",
answer_4: "font",
right_answer: 1,
},
{
question: "Which is the correct CSS syntax?",
answer_1: "body {color: black;}",
answer_2: "{body:color=black;}",
answer_3: "{body;color:black;}",
answer_4: "body:color=black;",
right_answer: 1,
},
{
question: "How do you insert a comment in a CSS file?",
answer_1: "// this is a comment",
answer_2: "/* this is a comment */",
answer_3: "' this is a comment",
answer_4: "// this is a comment //",
right_answer: 2,
},
{
question: "Which property is used to change the background color?",
answer_1: "color",
answer_2: "bgcolor",
answer_3: "background-color",
answer_4: "background",
right_answer: 3,
},
{
question: "Which CSS property is used to change the text color of an element?",
answer_1: "fgcolor",
answer_2: "color",
answer_3: "text-color",
answer_4: "font-color",
right_answer: 2,
},
{
question: "Which CSS property controls the text size?",
answer_1: "text-size",
answer_2: "font-style",
answer_3: "font-size",
answer_4: "text-style",
right_answer: 3,
},
{
question: "How do you make each word in a text start with a capital letter?",
answer_1: "text-transform:capitalize",
answer_2: "text-style:capitalize",
answer_3: "transform:capitalize",
answer_4: "font-transform:capitalize",
right_answer: 1,
},
{
question: "Which property is used to change the left margin of an element?",
answer_1: "margin-left",
answer_2: "padding-left",
answer_3: "indent",
answer_4: "margin",
right_answer: 1,
},
{
question: "How do you select an element with id 'demo'?",
answer_1: "#demo",
answer_2: ".demo",
answer_3: "demo",
answer_4: "*demo",
right_answer: 1,
}
],
javascript: [
{
question: "What is the correct JavaScript syntax to change the content of the HTML element below?\n<p id='demo'>This is a demonstration.</p>",
answer_1: "document.getElementByName('p').innerHTML = 'Hello World!';",
answer_2: "#demo.innerHTML = 'Hello World!';",
answer_3: "document.getElement('p').innerHTML = 'Hello World!';",
answer_4: "document.getElementById('demo').innerHTML = 'Hello World!';",
right_answer: 4,
},
{
question: "Where is the correct place to insert a JavaScript?",
answer_1: "The <body> section",
answer_2: "The <head> section",
answer_3: "Both the <head> section and the <body> section are correct",
answer_4: "None of the above",
right_answer: 3,
},
{
question: "What is the correct syntax for referring to an external script called 'xxx.js'?",
answer_1: "<script href='xxx.js'>",
answer_2: "<script name='xxx.js'>",
answer_3: "<script src='xxx.js'>",
answer_4: "<script file='xxx.js'>",
right_answer: 3,
},
{
question: "How do you write 'Hello World' in an alert box?",
answer_1: "alertBox('Hello World');",
answer_2: "msgBox('Hello World');",
answer_3: "alert('Hello World');",
answer_4: "msg('Hello World');",
right_answer: 3,
},
{
question: "How do you create a function in JavaScript?",
answer_1: "function = myFunction()",
answer_2: "function:myFunction()",
answer_3: "function myFunction()",
answer_4: "function => myFunction()",
right_answer: 3,
},
{
question: "How do you call a function named 'myFunction'?",
answer_1: "call myFunction()",
answer_2: "call function myFunction()",
answer_3: "myFunction()",
answer_4: "Call.myFunction()",
right_answer: 3,
},
{
question: "How do you write an IF statement in JavaScript?",
answer_1: "if i = 5 then",
answer_2: "if i == 5 then",
answer_3: "if (i == 5)",
answer_4: "if i = 5",
right_answer: 3,
},
{
question: "How does a WHILE loop start?",
answer_1: "while (i <= 10; i++)",
answer_2: "while (i <= 10)",
answer_3: "while i = 1 to 10",
answer_4: "while (i <= 10) {i++}",
right_answer: 2,
},
{
question: "How does a FOR loop start?",
answer_1: "for i = 1 to 5",
answer_2: "for (i = 0; i <= 5)",
answer_3: "for (i = 0; i <= 5; i++)",
answer_4: "for (i <= 5; i++)",
right_answer: 3,
},
{
question: "How do you declare a JavaScript variable?",
answer_1: "var carName;",
answer_2: "variable carName;",
answer_3: "v carName;",
answer_4: "var: carName;",
right_answer: 1,
}
],
java: [
{
question: "Which company developed Java?",
answer_1: "Microsoft",
answer_2: "Google",
answer_3: "Sun Microsystems",
answer_4: "Apple",
right_answer: 3,
},
{
question: "Which data type is used to create a variable that should store text?",
answer_1: "String",
answer_2: "Txt",
answer_3: "myString",
answer_4: "string",
right_answer: 1,
},
{
question: "How do you create a variable with the numeric value 5?",
answer_1: "float x = 5;",
answer_2: "int x = 5;",
answer_3: "num x = 5;",
answer_4: "x = 5;",
right_answer: 2,
},
{
question: "Which method can be used to find the length of a string?",
answer_1: "length()",
answer_2: "getSize()",
answer_3: "getLength()",
answer_4: "len()",
right_answer: 1,
},
{
question: "Which keyword is used to create a class in Java?",
answer_1: "class",
answer_2: "Class",
answer_3: "define",
answer_4: "MyClass",
right_answer: 1,
},
{
question: "How do you create a method in Java?",
answer_1: "method myMethod()",
answer_2: "function myMethod()",
answer_3: "method:myMethod()",
answer_4: "public void myMethod()",
right_answer: 4,
},
{
question: "Which statement is used to stop a loop?",
answer_1: "exit",
answer_2: "break",
answer_3: "return",
answer_4: "stop",
right_answer: 2,
},
{
question: "Which keyword is used to return a value inside a method?",
answer_1: "get",
answer_2: "return",
answer_3: "break",
answer_4: "void",
right_answer: 2,
},
{
question: "Which operator is used to compare two values?",
answer_1: "=",
answer_2: "==",
answer_3: "===",
answer_4: "!=",
right_answer: 2,
},
{
question: "Which method can be used to convert all characters in a string to uppercase?",
answer_1: "upperCase()",
answer_2: "toUpperCase()",
answer_3: "toUpper()",
answer_4: "uppercase()",
right_answer: 2,
}
]
};