-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathhome.html
393 lines (388 loc) · 20.2 KB
/
home.html
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
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="../../../../favicon.ico">
<!-- <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
-->
<title>MCQ</title>
<!-- Bootstrap core CSS -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="home.css">
</head>
<body>
<script type="text/javascript">
function check(x)
{
document.getElementById("glow").bgColor=x
}
</script>
<div class="d-flex flex-column flex-md-row align-items-center p-3 px-md-4 mb-3 bg-white border-bottom box-shadow">
<h5 class="my-0 mr-md-auto font-weight-normal">MCQ</h5>
<a class="btn btn-outline-primary" href="#">Sign up</a>
</div>
<h2>JavaScript Questions</h2>
<div class="container">
<div class="card" style="width: 50%;">
<div class="card-body">
<h5 class="card-title">Question 1:</h5>
<p class="card-text">Can you access Cookie using javascript?</p>
<div>
<input type="radio" name="" value="A" onclick="show1();" /> A. True
<div id="divv1" class="hide" class="icon" class="displa">☑</div> <br>
<input type="radio" name="" value="B" onclick="showb1();" /> B. False
<div id="dib1" class="hide"> ☒</div> <br>
<div id="div1" class="hide">
<hr>Answer: A
</div>
</div>
</div>
</div>
<div class="card" style="width: 50%;">
<div class="card-body">
<h5 class="card-title">Question 2:</h5>
<p class="card-text">Which of the following type of variable is visible everywhere in your JavaScript code?</p>
<div>
<input type="radio" onclick="show2();"/>A. Global Variable
<div id="divv2" class="hide" class="icon" class="displa">☑</div> <br>
<input type="radio" onclick="showb2();" />B. Local Variable
<div id="dib2" class="hide"> ☒</div> <br>
<input type="radio" onclick="showb2();" />C. Both of the above
<div id="dic2" class="hide"> ☒</div> <br>
<input type="radio" value="D" onclick="showb2();" />D. None of the above
<div id="did2" class="hide"> ☒</div> <br>
<div id="div2" class="hide">
<hr><p>Answer: A</p>
</div>
</div>
</div>
</div>
<div class="card" style="width: 50%;">
<div class="card-body">
<h5 class="card-title">Question 3:</h5>
<p class="card-text">Which of the following type of variable takes precedence over other if names are same?</p>
<div>
<input type="radio" name="" value="A" onclick="showc3();" /> A. Global Variable
<div id="dib3" class="hide"> ☒</div> <br>
<input type="radio" name="" value="B" onclick="show3();" /> B. Local Variable
<div id="divv3" class="hide" class="icon" class="displa">☑</div> <br>
<input type="radio" name="" value="C" onclick="showc3();" /> C. Both of the above
<div id="dic3" class="hide"> ☒</div> <br>
<input type="radio" name="" value="D" onclick="showc3();" /> D. None of the above
<div id="did3" class="hide"> ☒</div>
<div id="div3" class="hide">
<hr><p>Answer: B</p>
</div>
</div>
</div>
</div>
<div class="card" style="width: 50%;">
<div class="card-body">
<h5 class="card-title">Question 4:</h5>
<p class="card-text">Which built-in method sorts the elements of an array?</p>
<div>
<input type="radio" name="gender" value="A" onclick="showd4();" /> A. changeOrder(order)
<div id="dib4" class="hide"> ☒</div> <br>
<input type="radio" name="gender" value="B" onclick="showd4();" /> B. order()
<div id="dic4" class="hide"> ☒</div> <br>
<input type="radio" name="gender" value="C" onclick="show4();" /> C. sort()
<div id="divv4" class="hide" class="icon" class="displa">☑</div><br>
<input type="radio" name="gender" value="D" onclick="showd4();" /> D. None of the above
<div id="did4" class="hide"> ☒</div> <br>
<div id="div4" class="hide" >
<hr><p>Answer: C</p>
</div>
</div>
</div>
</div>
<div class="card" style="width: 50%;">
<div class="card-body">
<h5 class="card-title">Question 5:</h5>
<p class="card-text">Which of the following function of String object returns the character at the specified index?</p>
<div>
<input type="radio" name="gender" value="A" onclick="show5();" /> A. charAt()
<div id="divv5" class="hide" class="icon" class="displa">☑</div><br>
<input type="radio" name="gender" onclick="showd5();" /> B. charCodeAt()
<div id="dib5" class="hide"> ☒</div> <br>
<input type="radio" name="gender" onclick="showd5();" /> C. concat()
<div id="dic5" class="hide"> ☒</div> <br>
<input type="radio" name="gender" onclick="showd5();" /> D. indexOf()
<div id="did5" class="hide"> ☒</div>
<div id="div5" class="hide">
<hr><p>Answer: A</p>
</div>
</div>
</div>
</div>
<div class="card" style="width: 50%;">
<div class="card-body">
<h5 class="card-title">Question 6:</h5>
<p class="card-text">Which of the following function of String object is used to find a match between a regular expression and a string, and to replace the matched substring with a new substring?</p>
<div>
<input type="radio" name="gender" value="A" onclick="showd6();" /> A. concat()
<div id="dic6" class="hide"> ☒</div> <br>
<input type="radio" name="gender" value="B" onclick="showd6();" /> B. match()
<div id="dib6" class="hide"> ☒</div> <br>
<input type="radio" name="gender" value="C" onclick="show6();" /> C. replace()
<div id="divv6" class="hide" class="icon" class="displa">☑</div><br>
<input type="radio" name="gender" value="D" onclick="showd6();" /> D. search()
<div id="did6" class="hide"> ☒</div>
<div id="div6" class="hide">
<hr><p>Answer: C</p>
</div>
</div>
</div>
</div>
<div class="card" style="width: 50%;">
<div class="card-body">
<h5 class="card-title">Question 7:</h5>
<p class="card-text">Which of the following function of String object creates a string to be displayed in a big font as if it were in a big tag?</p>
<div>
<input type="radio" name="gender" value="A" onclick="showd7();" /> A. anchor()
<div id="dib7" class="hide"> ☒</div> <br>
<input type="radio" name="gender" value="B" onclick="show7();" /> B. big()
<div id="divv7" class="hide" class="icon" class="displa">☑</div><br>
<input type="radio" name="gender" value="C" onclick="showd7();" /> C. blink()
<div id="dic7" class="hide"> ☒</div> <br>
<input type="radio" name="gender" value="D" onclick="showd7();" /> D. italics()
<div id="did7" class="hide"> ☒</div>
<div id="div7" class="hide">
<hr><p>Answ er: B</p>
</div>
</div>
</div>
</div>
<div class="card" style="width: 50%;">
<div class="card-body">
<h5 class="card-title">Question 8:</h5>
<p class="card-text">Which of the following function of String object creates an HTML hypertext link that requests another URL?</p>
<div>
<input type="radio" name="gender" value="A" onclick="show8();" /> A. link()
<div id="divv8" class="hide" class="icon" class="displa">☑</div><br>
<input type="radio" name="gender" value="B" onclick="showd8();" /> B. sub()
<div id="dib8" class="hide"> ☒</div><br>
<input type="radio" name="gender" value="C" onclick="showd8();" /> C. sup()
<div id="dic8" class="hide"> ☒</div><br>
<input type="radio" name="gender" value="D" onclick="showd8();" /> D. small()
<div id="did8" class="hide"> ☒</div>
<div id="div8" class="hide">
<hr><p>Answer: A</p>
</div>
</div>
</div>
</div>
<div class="card" style="width: 50%;">
<div class="card-body">
<h5 class="card-title">Question 9:</h5>
<p class="card-text">Which of the following function of Array object adds one or more elements to the end of an array and returns the new length of the array?</p>
<div>
<input type="radio" name="gender" value="A" onclick="showd9();" /> A. pop()
<div id="dib9" class="hide"> ☒</div><br>
<input type="radio" name="gender" value="B" onclick="show9();" /> B. push()
<div id="divv9" class="hide" class="icon" class="displa">☑</div><br>
<input type="radio" name="gender" value="C" onclick="showd9();" /> C. join()
<div id="dic9" class="hide"> ☒</div><br>
<input type="radio" name="gender" value="D" onclick="showd9();" /> D. map()
<div id="did9" class="hide"> ☒</div>
<div id="div9" class="hide">
<hr><p>Answer: B</p>
</div>
</div>
</div>
</div>
<div class="card" style="width: 50%;">
<div class="card-body">
<h5 class="card-title">Question 10:</h5>
<p class="card-text">Which of the following function of Array object reverses the order of the elements of an array?</p>
<div>
<input type="radio" name="gender" value="A" onclick="show10();" /> A. reverse()
<div id="divv10" class="hide" class="icon" class="displa">☑</div><br>
<input type="radio" name="gender" value="B" onclick="showd10();" /> B. push()
<div id="dib10" class="hide"> ☒</div><br>
<input type="radio" name="gender" value="C" onclick="showd10();" /> C. reduce()
<div id="dic10" class="hide"> ☒</div><br>
<input type="radio" name="gender" value="D" onclick="showd10();" /> D. reduceRight()
<div id="did10" class="hide"> ☒</div>
<div id="div10" class="hide">
<hr><p>Answer: A</p>
</div>
</div>
</div>
</div>
<div class="card" style="width: 50%;">
<div class="card-body">
<h5 class="card-title">Question 11:</h5>
<p class="card-text">The enumeration order becomes implementation dependent and non-interoperable if :</p>
<div>
<input type="radio" name="gender" value="A" onclick="show11();" /> A. If the object inherits enumerable properties<div id="divv11" class="hide" class="icon" class="displa">☑</div><br>
<input type="radio" name="gender" value="B" onclick="showd11();" /> B. The object does not have the properties present in the integer array indices<div id="dib11" class="hide"> ☒</div><br>
<input type="radio" name="gender" value="C" onclick="showd11();" /> C. The delete keyword is never used<div id="dic11" class="hide"> ☒</div><br>
<input type="radio" name="gender" value="D" onclick="showd11();" /> D. Object.defineProperty() is not used<div id="did11" class="hide"> ☒</div>
<div id="div11" class="hide">
<hr><p>Answer: A</p>
</div>
</div>
</div>
</div>
<div class="card" style="width: 50%;">
<div class="card-body">
<h5 class="card-title">Question 12:</h5>
<p class="card-text">When an empty statement is encountered, a JavaScript interpreter</p>
<div>
<input type="radio" name="gender" value="A" onclick="show12();" /> A. Ignores the statement
<div id="divv12" class="hide" class="icon" class="displa">☑</div><br>
<input type="radio" name="gender" value="B" onclick="showd12();" /> B. Prompts to complete the statement<div id="dib12" class="hide"> ☒</div><br>
<input type="radio" name="gender" value="C" onclick="showd12();" /> C. Throws an error<div id="dic12" class="hide"> ☒</div><br>
<input type="radio" name="gender" value="D" onclick="showd12();" /> D. Throws an exception<div id="did12" class="hide"> ☒</div>
<div id="div12" class="hide">
<hr><p>Answer: A</p>
</div>
</div>
</div>
</div>
<div class="card" style="width: 50%;">
<div class="card-body">
<h5 class="card-title">Question 13:</h5>
<p class="card-text"> A statement block is a</p>
<div>
<input type="radio" name="gender" value="A" onclick="showd13();" /> A. conditional block<div id="dib13" class="hide"> ☒</div><br>
<input type="radio" name="gender" value="B" onclick="showd13();" /> B. block that contains a single statement<div id="dic13" class="hide"> ☒</div><br>
<input type="radio" name="gender" value="C" onclick="showd13();" /> C. Both conditional block and single statement<div id="did13" class="hide"> ☒</div><br>
<input type="radio" name="gender" value="D" onclick="show13();" /> D. block that combines multiple statements into a single compound statement<div id="divv13" class="hide" class="icon" class="displa">☑</div>
<div id="div13" class="hide">
<hr><p>Answer: D</p>
</div>
</div>
</div>
</div>
<div class="card" style="width: 50%;">
<div class="card-body">
<h5 class="card-title">Question 14:</h5>
<p class="card-text">A conditional expression is also called a</p>
<div>
<input type="radio" name="gender" value="A" onclick="showd14();" /> A. Alternative to if-else<div id="dib14" class="hide"> ☒</div><br>
<input type="radio" name="gender" value="B" onclick="show14();" /> B. Immediate if
<div id="divv14" class="hide" class="icon" class="displa">☑</div><br>
<input type="radio" name="gender" value="C" onclick="showd14();" /> C. If-then-else statement<div id="dic14" class="hide"> ☒</div><br>
<input type="radio" name="gender" value="D" onclick="showd14();" /> D. None of the mentioned<div id="did14" class="hide"> ☒</div>
<div id="div14" class="hide">
<hr><p>Answer: B</p>
</div>
</div>
</div>
</div>
<div class="card" style="width: 50%;">
<div class="card-body">
<h5 class="card-title">Question 15:</h5>
<p class="card-text">JavaScript is a _______________ language</p>
<div>
<input type="radio" name="gender" value="A" onclick="showd15();" /> A. Object-Oriented
<div id="dib15" class="hide"> ☒</div><br>
<input type="radio" name="gender" value="B" onclick="showd15();" /> B. High-level<div id="dic15" class="hide"> ☒</div><br>
<input type="radio" name="gender" value="C" onclick="showd15();" /> C. Assembly-language<div id="did15" class="hide"> ☒</div><br>
<input type="radio" name="gender" value="D" onclick="show15();" /> D. Object-Based<div id="divv15" class="hide" class="icon" class="displa">☑</div>
<div id="div15" class="hide">
<hr><p>Answer: D</p>
</div>
</div>
</div>
</div>
<div class="card" style="width: 50%;">
<div class="card-body">
<h5 class="card-title">Question 16:</h5>
<p class="card-text">The JavaScript’s syntax calling ( or executing ) a function or method is called</p>
<div>
<input type="radio" name="gender" value="A" onclick="showd16();" /> A. Primary expression<div id="dib16" class="hide"> ☒</div><br>
<input type="radio" name="gender" value="B" onclick="showd16();" /> B. Functional expression<div id="dic16" class="hide"> ☒</div><br>
<input type="radio" name="gender" value="C" onclick="show16();" /> C. Invocation expression<div id="divv16" class="hide" class="icon" class="displa">☑</div><br>
<input type="radio" name="gender" value="D" onclick="showd16();" /> D. Property Access Expression<div id="did16" class="hide"> ☒</div>
<div id="div16" class="hide">
<hr><p>Answer: C</p>
</div>
</div>
</div>
</div>
<div class="card" style="width: 50%;">
<div class="card-body">
<h5 class="card-title">Question 17:</h5>
<p class="card-text">What kind of an expression is “new Point(2,3)”?</p>
<div>
<input type="radio" name="gender" value="A" onclick="showd17();" /> A. Primary expression<div id="dib17" class="hide"> ☒</div><br>
<input type="radio" name="gender" value="B" onclick="show17();" /> B. Object Creation Expression<div id="divv17" class="hide" class="icon" class="displa">☑</div><br>
<input type="radio" name="gender" value="C" onclick="showd17();" /> C. Invocation expression<div id="dic17" class="hide"> ☒</div><br>
<input type="radio" name="gender" value="D" onclick="showd17();" /> D. Constructor Calling Expression<div id="did17" class="hide"> ☒</div>
<div id="div17" class="hide">
<hr><p>Answer: B</p>
</div>
</div>
</div>
</div>
<div class="card" style="width: 50%;">
<div class="card-body">
<h5 class="card-title">Question 18:</h5>
<p class="card-text">Which of the operator is used to test if a particular property exists or not?</p>
<div>
<input type="radio" name="gender" value="A" onclick="show18();" /> A. in<div id="divv18" class="hide" class="icon" class="displa">☑</div><br>
<input type="radio" name="gender" value="B" onclick="showd18();" /> B. exist<div id="dib18" class="hide"> ☒</div><br>
<input type="radio" name="gender" value="C" onclick="showd18();" /> C. within<div id="dic18" class="hide"> ☒</div><br>
<input type="radio" name="gender" value="D" onclick="showd18();" /> D. exists<div id="did18" class="hide"> ☒</div>
<div id="div18" class="hide">
<hr><p>Answer: A</p>
</div>
</div>
</div>
</div>
<div class="card" style="width: 50%;">
<div class="card-body">
<h5 class="card-title">Question 19:</h5>
<p class="card-text">Among the following, which one is a ternary operator?</p>
<div>
<input type="radio" name="gender" value="A" onclick="showd19();" /> A. +<div id="dib19" class="hide"> ☒</div><br>
<input type="radio" name="gender" value="B" onclick="showd19();" /> B. :<div id="dic19" class="hide"> ☒</div><br>
<input type="radio" name="gender" value="C" onclick="showd19();" /> C. -<div id="did19" class="hide"> ☒</div><br>
<input type="radio" name="gender" value="D" onclick="show19();" /> D. ?:<div id="divv19" class="hide" class="icon" class="displa">☑</div>
<div id="div19" class="hide">
<hr><p>Answer: D</p>
</div>
</div>
</div>
</div>
<div class="card" style="width: 50%;">
<div class="card-body">
<h5 class="card-title">Question 20:</h5>
<p class="card-text">An expression that can legally appear on the left side of an assignment expression.” is a well known explanation for variables, properties of objects, and elements of arrays. They are called</p>
<div>
<input type="radio" name="gender" value="A" onclick="showd20();" /> A. Properties<div id="dib20" class="hide"> ☒</div><br>
<input type="radio" name="gender" value="B" onclick="showd20();" /> B. Prototypediv <div id="dic20" class="hide"> ☒</div><br>
<input type="radio" name="gender" value="C" onclick="showd20();" /> C. LValue <div id="did20" class="hide"> ☒</div><br>
<input type="radio" name="gender" value="D" onclick="show20();" /> D. Definition<div id="divv20" class="hide" class="icon" class="displa">☑</div>
<div id="div20" class="hide">
<hr><p>Answer: D</p>
</div>
</div>
</div>
</div>
</div>
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script type="text/javascript" src="home.js" rel="stylesheet"></script>
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script>window.jQuery || document.write('<script src="../../assets/js/vendor/jquery-slim.min.js"><\/script>')</script>
<script src="../../assets/js/vendor/popper.min.js"></script>
<script src="../../dist/js/bootstrap.min.js"></script>
<script src="../../assets/js/vendor/holder.min.js"></script>
<script>
Holder.addTheme('thumb', {
bg: '#55595c',
fg: '#eceeef',
text: 'Thumbnail'
});
</script>
</body>
</html>