-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjavascript.html
More file actions
227 lines (199 loc) · 6.98 KB
/
Copy pathjavascript.html
File metadata and controls
227 lines (199 loc) · 6.98 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Javascript Exam</title>
<link rel="icon" href="./images/exm.png" type="image/png">
<link rel="stylesheet" href="quations.css">
</head>
<body>
<h1>javascript exam quations</h1>
<p class="pnote">NOTE :- If you score the above 50% then you pass in exam.</p>
<div class="qcontain">
<div class="q1 quation">
<p>1. Which of the following is the correct way to declare a JavaScript variable?</p>
<label>
<input type="radio" name="q1" value="a"> a) var myVariable;
</label>
<br>
<label>
<input type="radio" name="q1" value="b"> b) let myVariable;
</label>
<br>
<label>
<input type="radio" name="q1" value="c"> c) const myVariable;
</label>
<br>
<label>
<input type="radio" name="q1" value="d"> d) All of the above
</label>
</div>
<div class="q2 quation">
<p>2. Which operator is used to assign a value to a variable in JavaScript?</p>
<label>
<input type="radio" name="q2" value="a"> a) ==
</label>
<br>
<label>
<input type="radio" name="q2" value="b"> b) =
</label>
<br>
<label>
<input type="radio" name="q2" value="c"> c) ===
</label>
<br>
<label>
<input type="radio" name="q2" value="d"> d) !=
</label>
</div>
<div class="q3 quation">
<p>3. What does NaN stand for in JavaScript?</p>
<label>
<input type="radio" name="q3" value="a"> a) Not a Number
</label>
<br>
<label>
<input type="radio" name="q3" value="b"> b) Number not Available
</label>
<br>
<label>
<input type="radio" name="q3" value="c"> c) Null and Not
</label>
<br>
<label>
<input type="radio" name="q3" value="d"> d) None of the above
</label>
</div>
<div class="q4 quation">
<p>4. What is the output of console.log(2 + "2"); in JavaScript?</p>
<label>
<input type="radio" name="q4" value="a"> a) 4
</label>
<br>
<label>
<input type="radio" name="q4" value="b"> b) 22
</label>
<br>
<label>
<input type="radio" name="q4" value="c"> c) undefined
</label>
<br>
<label>
<input type="radio" name="q4" value="d"> d) Error
</label>
</div>
<div class="q5 quation">
<p>5. Which method is used to find the length of an array in JavaScript?</p>
<label>
<input type="radio" name="q5" value="a"> a) length()
</label>
<br>
<label>
<input type="radio" name="q5" value="b"> b) getLength()
</label>
<br>
<label>
<input type="radio" name="q5" value="c"> c) arrayLength()
</label>
<br>
<label>
<input type="radio" name="q5" value="d"> d) .length
</label>
</div>
<div class="q6 quation">
<p>6. Which of the following is a correct way to define a function in JavaScript?</p>
<label>
<input type="radio" name="q6" value="a"> a) function myFunction[] {}
</label>
<br>
<label>
<input type="radio" name="q6" value="b"> b) function myFunction() {}
</label>
<br>
<label>
<input type="radio" name="q6" value="c"> c) function: myFunction() {}
</label>
<br>
<label>
<input type="radio" name="q6" value="d"> d) myFunction() => {}
</label>
</div>
<div class="q7 quation">
<p>7. Which event is triggered when the user clicks on an HTML element?</p>
<label>
<input type="radio" name="q7" value="a"> a) onhover
</label>
<br>
<label>
<input type="radio" name="q7" value="b"> b) onfocus
</label>
<br>
<label>
<input type="radio" name="q7" value="c"> c) onclick
</label>
<br>
<label>
<input type="radio" name="q7" value="d"> d) onchange
</label>
</div>
<div class="q8 quation">
<p>8. What is the purpose of the typeof operator in JavaScript?</p>
<label>
<input type="radio" name="q8" value="a"> a) To define a variable type
</label>
<br>
<label>
<input type="radio" name="q8" value="b"> b) To determine the type of a variable
</label>
<br>
<label>
<input type="radio" name="q8" value="c"> c) To create a new variable
</label>
<br>
<label>
<input type="radio" name="q8" value="d"> d) To check if a variable is null
</label>
</div>
<div class="q9 quation">
<p>9. Which built-in method can be used to convert a string to lowercase in JavaScript?</p>
<label>
<input type="radio" name="q9" value="a"> a) toLowerCase()
</label>
<br>
<label>
<input type="radio" name="q9" value="b"> b) lowercase()
</label>
<br>
<label>
<input type="radio" name="q9" value="c"> c) toLower()
</label>
<br>
<label>
<input type="radio" name="q9" value="d"> d) convertLowerCase()
</label>
</div>
<div class="q10 quation">
<p>10. Which keyword is used to define a JavaScript class?</p>
<label>
<input type="radio" name="q10" value="a"> a) className
</label>
<br>
<label>
<input type="radio" name="q10" value="b"> b) class
</label>
<br>
<label>
<input type="radio" name="q10" value="c"> c) function
</label>
<br>
<label>
<input type="radio" name="q10" value="d"> d) constructor
</label>
</div>
</div>
<button class="submit">SUBMIT</button>
<h1 class="disp"></h1>
<script src="quations.js"></script>
</body>
</html>