

MCQOPTIONS
Saved Bookmarks
This section includes 8 Mcqs, each offering curated multiple-choice questions to sharpen your Javascript knowledge and support exam preparation. Choose a topic below to get started.
1. |
HOW_CAN_WE_CHECK_THE_SUBPROTOCOL_BEING_USED_BY_THE_CLIENT??$ |
A. | subprotocol property |
B. | protocol property |
C. | clientprotocol property |
D. | none of the mentioned |
Answer» D. none of the mentioned | |
2. |
How will you transmit data using the connection?$ |
A. | send(data) |
B. | Socket.send(“data”) |
C. | Socket.send(data) |
D. | Socket(data) |
Answer» E. | |
3. |
Which of the following are not a socket property? |
A. | onopen |
B. | readyState |
C. | onmessage |
D. | ready |
Answer» E. | |
4. |
How does the client and the server communicate following the rules defined by the WebSocket protocol? |
A. | Long-lived TCP Socket |
B. | Short-lived TCP Socket |
C. | UDP Socket |
D. | HTTP Socket |
Answer» B. Short-lived TCP Socket | |
5. |
Which method is used to close the WebSocket? |
A. | Socket.flush() |
B. | Socket.close() |
C. | Socket.Close() |
D. | Socket.dispose() |
Answer» C. Socket.Close() | |
6. |
How many WebSocket events are available? |
A. | 2 |
B. | 3 |
C. | 4 |
D. | 5 |
Answer» D. 5 | |
7. |
What does the value 2 of the WebSocket attribute Socket.readyState indicate? |
A. | Closed connection |
B. | Handshake connection |
C. | Unestablished connection |
D. | Established connection and communication is possible |
Answer» C. Unestablished connection | |
8. |
Which of the following is a stateless protocol? |
A. | HTML |
B. | XHTML |
C. | HTTP |
D. | All of the mentioned |
Answer» D. All of the mentioned | |