JOBSEEKERS
Login
Sign Up
Jobseeker
Employer
Staffing Firm
Direct Client
Javascript interview questions part 45
Javascript interview questions part 45
Back
Take as many assements as you can to improve your validate your skill rating
Total Questions: 20
1. Which is the function that is called to validate a data?
A. validate()
B. valid()
C. validation()
D. none of the mentioned
Show Correct Answer
Correct Answer is :
none of the mentioned
2. How to find the index of a particular string?
A. position()
B. index()
C. indexOf()
D. none of the mentioned
Show Correct Answer
Correct Answer is :
indexOf()
3. How do you focus a particular part of the HTML page in JavaScript?
A. hover()
B. focus()
C. on()
D. all of the mentioned
Show Correct Answer
Correct Answer is :
focus()
4. Which of the following is the child object of the JavaScript navigator?
A. Navicat
B. Plugins
C. NetRight
D. None of the mentioned
Show Correct Answer
Correct Answer is :
Plugins
5. Which of the following are the properties of a plug-in entry?
A. name
B. filename
C. mimeTypes
D. all of the mentioned
Show Correct Answer
Correct Answer is :
all of the mentioned
6. What is the purpose of the mimeTypes property of a plug-in entry?
A. Contains MIME properties
B. Contains MIME sizes
C. Contains MIME types
D. None of the mentioned
Show Correct Answer
Correct Answer is :
Contains MIME types
7. Which of the following is a stateless protocol?
A. HTML
B. XHTML
C. HTTP
D. XML
Show Correct Answer
Correct Answer is :
HTTP
8. 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
Show Correct Answer
Correct Answer is :
Handshake connection
9. How many WebSocket events are available?
A. 2
B. 3
C. 4
D. 5
Show Correct Answer
Correct Answer is :
4
10. Which method is used to close the WebSocket?
A. Socket.flush()
B. Socket.close()
C. Socket.Close()
D. Socket.dispose()
Show Correct Answer
Correct Answer is :
Socket.close()
11. 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
Show Correct Answer
Correct Answer is :
Long-lived TCP Socket
12. Which of the following is not a socket property?
A. onopen
B. readyState
C. onmessage
D. ready
Show Correct Answer
Correct Answer is :
ready
13. Consider the following one-line code. var httpserver = new http.Server(); What does the above code do?
A. Create an HTTP Server
B. Create HTTP Connection between Client and Server
C. HTTP Server & Connection
D. Create a connection between two servers
Show Correct Answer
Correct Answer is :
Create an HTTP Server
14. How can we check the subprotocol being used by the client?
A. subprotocol property
B. protocol property
C. clientprotocol property
D. client property
Show Correct Answer
Correct Answer is :
protocol property
15. How will you transmit data using the connection?
A. send(data)
B. Socket.send(“data”)
C. Socket.send(data)
D. Socket(data)
Show Correct Answer
Correct Answer is :
Socket.send(data)
16. Which of the following is not a WebSocket event?
A. open
B. close
C. error
D. deny
Show Correct Answer
Correct Answer is :
deny
17. 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
Show Correct Answer
Correct Answer is :
Single-threaded
18. Which of the following functions are synchronous?
A. load()
B. require()
C. both load() and require()
D. none of the mentioned
Show Correct Answer
Correct Answer is :
both load() and require()
19. 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
Show Correct Answer
Correct Answer is :
All of the mentioned
20. The object that looks to the thread that creates it is
A. Window
B. Worker
C. Element
D. Hash
Show Correct Answer
Correct Answer is :
Worker
Similar Interview Questions
Search for latest jobs
Find Jobs