MCQOPTIONS
Saved Bookmarks
This section includes 10 Mcqs, each offering curated multiple-choice questions to sharpen your Javascript knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
WHICH_PROPERTY_IS_USED_TO_MANAGE_MULTIPLE_EVENT_HANDLERS??$ |
| A. | onmessage |
| B. | onerror |
| C. | both onmessage and onerror |
| D. | none of the mentioned |
| Answer» D. none of the mentioned | |
| 2. |
Which is the function that allows a worker to terminate itself?$ |
| A. | close() |
| B. | exit() |
| C. | terminate() |
| D. | halt() |
| Answer» B. exit() | |
| 3. |
How can you send data using a Worker object? |
| A. | postMessage() |
| B. | sendMessage() |
| C. | Message() |
| D. | post() |
| Answer» B. sendMessage() | |
| 4. |
What will happen if you specify an absolute URL in the Worker constructor? |
| A. | Resolves itself |
| B. | Must have the same origin |
| C. | Must not have the same origin |
| D. | None of the mentioned |
| Answer» C. Must not have the same origin | |
| 5. |
Which will be invoked to create a new worker? |
| A. | Function |
| B. | Destructor |
| C. | Constructor |
| D. | Interface |
| Answer» D. Interface | |
| 6. |
Which of the following is a global object for a new worker? |
| A. | WorkerGlobalScope |
| B. | Worker |
| C. | WorkerScope |
| D. | Window |
| Answer» B. Worker | |
| 7. |
The object that looks to the thread that creates it is |
| A. | Window |
| B. | Worker |
| C. | Element |
| D. | Hash |
| Answer» C. Element | |
| 8. |
Why shouldn’t JavaScript functions not be too long?$ |
| A. | User friendliness |
| B. | Tie up event loops |
| C. | Browser becomes unresponsive |
| D. | All of the mentioned |
| Answer» E. | |
| 9. |
Which of the following functions are synchronous? |
| A. | load() |
| B. | require() |
| C. | both load() and require() |
| D. | none of the mentioned |
| Answer» D. none of the mentioned | |
| 10. |
Which of the following is one of the fundamental features of JavaScript? |
| A. | Single-threaded |
| B. | Multi-threaded |
| C. | Both Single-threaded and Multi-threaded |
| D. | None of the mentioned |
| Answer» B. Multi-threaded | |