You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: curriculum/challenges/english/25-front-end-development/quiz-local-storage-and-crud/66edd3f9bef926f129990425.md
+41-41Lines changed: 41 additions & 41 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@ To pass the quiz, you must correctly answer at least 18 of the 20 questions belo
17
17
18
18
#### --text--
19
19
20
-
What does 'CRUD' stand for in the context of web development?
20
+
What does CRUD stand for in the context of web development?
21
21
22
22
#### --distractors--
23
23
@@ -39,7 +39,7 @@ Create, Read, Update, Delete.
39
39
40
40
#### --text--
41
41
42
-
Which HTTP method is commonly associated with the 'Create' operation in a RESTful API?
42
+
Which HTTP method is commonly associated with the Create operation in a RESTful API?
43
43
44
44
#### --distractors--
45
45
@@ -61,7 +61,7 @@ Which HTTP method is commonly associated with the 'Create' operation in a RESTfu
61
61
62
62
#### --text--
63
63
64
-
Which of the following 'CRUD' operations is typically performed when modifying an existing record in a database?
64
+
Which of the following CRUD operations is typically performed when modifying an existing record in a database?
65
65
66
66
#### --distractors--
67
67
@@ -149,95 +149,95 @@ How can you remove a single item from sessionStorage?
149
149
150
150
#### --text--
151
151
152
-
What operation does `JSON.parse()` perform in JavaScript?
152
+
What is the difference between `PUT` and `PATCH`?
153
153
154
154
#### --distractors--
155
155
156
-
Converts a JavaScript object into a JSON string.
156
+
`PUT` modifies specific fields, while `PATCH` replaces the entire resource.
157
157
158
158
---
159
159
160
-
Encodes a JavaScript object into a base64 string.
160
+
`PUT` only adds new resources, while `PATCH` updates existing ones.
161
161
162
162
---
163
163
164
-
Validates if a given string is a valid JSON object.
164
+
`PUT` is used for retrieving data, while `PATCH`is used for sending data.
165
165
166
166
#### --answer--
167
167
168
-
Parses a JSON string and returns a corresponding JavaScript object.
168
+
`PUT` replaces the entire resource, while `PATCH` updates specific fields.
169
169
170
170
### --question--
171
171
172
172
#### --text--
173
173
174
-
Which of the following methods correctly converts the JavaScript object `const user = { name: "Emma", age: 35 };` into a JSON string?
174
+
What is the cache storage used for?
175
175
176
176
#### --distractors--
177
177
178
-
`JSON.encode(user)`
178
+
Cache storage is used to permanently store user credentials securely in the browser for authentication purposes.
179
179
180
180
---
181
181
182
-
`JSON.parse(user)`
182
+
Cache storage is used to store large volumes of structured data in the browser using a database system.
183
183
184
184
---
185
185
186
-
`JSON.toString(user)`
186
+
Cache storage is used to track user sessions and preferences by storing key-value pairs accessible across multiple websites.
187
187
188
188
#### --answer--
189
189
190
-
`JSON.stringify(user)`
190
+
Cache storage is used to store frequently requested network resources, reducing load times and improving performance.
191
191
192
192
### --question--
193
193
194
194
#### --text--
195
195
196
-
Which of the following values can be directly converted to JSON using `JSON.stringify()`?
196
+
What is a cookie in the context of web development?
197
197
198
198
#### --distractors--
199
199
200
-
`undefined`
200
+
A type of HTTP request.
201
201
202
202
---
203
203
204
-
A Function.
204
+
A piece of code that runs in the browser.
205
205
206
206
---
207
207
208
-
A DOM Element.
208
+
A method to store large files on a server.
209
209
210
210
#### --answer--
211
211
212
-
An Object.
212
+
A small piece of data stored by the user's web browser.
213
213
214
214
### --question--
215
215
216
216
#### --text--
217
217
218
-
What is a cookie in the context of web development?
218
+
Which of the following methods is used to manually set a cookie in JavaScript?
219
219
220
220
#### --distractors--
221
221
222
-
A type of HTTP request.
222
+
`document.setCookie`
223
223
224
224
---
225
225
226
-
A piece of code that runs in the browser.
226
+
`document.cookie.set`
227
227
228
228
---
229
229
230
-
A method to store large files on a server.
230
+
`document.createCookie`
231
231
232
232
#### --answer--
233
233
234
-
A small piece of data stored on the user's computer by the web browser.
234
+
`document.cookie`
235
235
236
236
### --question--
237
237
238
238
#### --text--
239
239
240
-
Which of the following code snippets correctly deletes a cookie named 'username'?
240
+
Which of the following code snippets correctly deletes a cookie named `username`?
241
241
242
242
#### --distractors--
243
243
@@ -263,19 +263,19 @@ Which of the following statements about cookies is false?
263
263
264
264
#### --distractors--
265
265
266
-
Cookies are sent to the server with every HTTP request.
266
+
Session cookies expire when the browser is closed.
267
267
268
268
---
269
269
270
-
Cookies can be accessed and modified via JavaScript.
270
+
HttpOnly cookies cannot be accessed by JavaScript.
271
271
272
272
---
273
273
274
-
Cookies have a maximum size limit of around 4KB per cookie.
274
+
Secure cookies are only transmitted over HTTPS.
275
275
276
276
#### --answer--
277
277
278
-
Cookies can only store string data.
278
+
Cookies can only be set by the server.
279
279
280
280
### --question--
281
281
@@ -285,63 +285,63 @@ What is browser fingerprinting?
285
285
286
286
#### --distractors--
287
287
288
-
A technique used to identify users based on their IP address.
288
+
A technique used in identifying users based on their IP address.
289
289
290
290
---
291
291
292
292
A form of data encryption.
293
293
294
294
---
295
295
296
-
A way to store data in the browser's cache.
296
+
A method of storing data in the browser's cache.
297
297
298
298
#### --answer--
299
299
300
-
A method of tracking users using unique attributes of their browser and device configuration.
300
+
A way of tracking users through browser and device attributes.
301
301
302
302
### --question--
303
303
304
304
#### --text--
305
305
306
-
What is a primary risk associated with improperly stored sensitive data in client-side storage?
306
+
What is a primary risk associated with storing passwords in local storage?
307
307
308
308
#### --distractors--
309
309
310
-
Data duplication.
310
+
Local storage data is deleted once you close the browser tab.
311
311
312
312
---
313
313
314
-
Data compression.
314
+
Local storage data is lost once you delete cookies.
315
315
316
316
---
317
317
318
-
Increased page load time.
318
+
Local storage doesn't work offline.
319
319
320
320
#### --answer--
321
321
322
-
Cross-Site Scripting (XSS) attacks.
322
+
Local storage is not encrypted and can be accessed easily.
323
323
324
324
### --question--
325
325
326
326
#### --text--
327
327
328
-
What is one way to mitigate the risk of XSS attacks affecting client-side storage?
328
+
What of the following statements is true about client-side storage?
329
329
330
330
#### --distractors--
331
331
332
-
Use plain text for all data stored in localStorage.
332
+
Client-side storage uses objects instead of strings to store data.
333
333
334
334
---
335
335
336
-
Increase the size limit of cookies.
336
+
Client-side storage uses cloud services to sync user data across multiple devices.
337
337
338
338
---
339
339
340
-
Disable JavaScript in the browser.
340
+
Client-side storage is more secure than server-side storage.
341
341
342
342
#### --answer--
343
343
344
-
Sanitize user inputs and escape outputs to prevent script injection.
344
+
Client-side storage allows websites to store data on a user's device.
0 commit comments