JOBSEEKERS
Login
Sign Up
Jobseeker
Employer
Staffing Firm
Direct Client
Javascript interview questions part 31
Javascript interview questions part 31
Back
Take as many assements as you can to improve your validate your skill rating
Total Questions: 20
1. Which is the property that is triggered in response to JavaScript errors?
A. onexception
B. onmessage
C. onerror
D. none of the mentioned
Show Correct Answer
Correct Answer is :
onerror
2. Which event can be fired on any scrollable document element?
A. Window
B. Scroll
C. Load
D. Unload
Show Correct Answer
Correct Answer is :
Scroll
3. How many node types are there in total?
A. 11
B. 12
C. 13
D. 14
Show Correct Answer
Correct Answer is :
12
4. What is the purpose of the Node object property ownerDocument?
A. Returns the root element
B. Returns the last element
C. Returns the parent node
D. Returns the immediate node
Show Correct Answer
Correct Answer is :
Returns the root element
5. Which of the following Node object property returns the local part of the name of a node?
A. lastName
B. localName
C. firstName
D. objectname
Show Correct Answer
Correct Answer is :
localName
6. What is the property textContent?
A. Sets the textual content of a node
B. Returns the textual content of a node
C. Sets & Returns the textual content of a node
D. Modifies texual content
Show Correct Answer
Correct Answer is :
Sets & Returns the textual content of a node
7. How many Node object methods are available?
A. 18
B. 19
C. 20
D. 21
Show Correct Answer
Correct Answer is :
18
8. Which of the following Node object property returns the node immediately before a node?
A. previousSibling
B. textContent
C. index
D. localName
Show Correct Answer
Correct Answer is :
previousSibling
9. What is the purpose of the method getUserData(key)?
A. Returns the associated object
B. Gets the user data
C. Returns the user data
D. Gets the user key
Show Correct Answer
Correct Answer is :
Returns the associated object
10. How to test if two nodes are equal?
A. isEqualNode()
B. equal()
C. #ERROR!
D. equalto()
Show Correct Answer
Correct Answer is :
isEqualNode()
11. How to associate an object to a key on a node?
A. getUserData()
B. cloneNode()
C. setUserData(key,data,handler)
D. clonedata()
Show Correct Answer
Correct Answer is :
setUserData(key,data,handler)
12. Which method is used to compare the placement of two nodes in the DOM hierarchy (document)?
A. compareDocumentPosition()
B. cloneNode()
C. getUserData()
D. getFeature()
Show Correct Answer
Correct Answer is :
compareDocumentPosition()
13. What does a Node object represent?
A. Single node
B. Set of nodes
C. Sequence of nodes
D. Node array
Show Correct Answer
Correct Answer is :
Single node
14. What does the nodeName of the nodeType Document return?
A. doctype name
B. target
C. #comment
D. #document
Show Correct Answer
Correct Answer is :
#document
15. What is the purpose of the method item()?
A. Returns node after the specified index
B. Returns node before the specified index
C. Returns node at specified index
D. Returns the node following the specified node
Show Correct Answer
Correct Answer is :
Returns node at specified index
16. How can the nodes in the node list be accessed?
A. Key
B. Index number
C. Looping
D. Value
Show Correct Answer
Correct Answer is :
Index number
17. Which of the following is the child(s) of the node type EntityReference?
A. Element
B. Text
C. Both Element and Text
D. Entity
Show Correct Answer
Correct Answer is :
Both Element and Text
18. Which node type represents the root-node of the DOM tree?
A. Document
B. DocumentFragment
C. DocumentType
D. Entity
Show Correct Answer
Correct Answer is :
Document
19. What is the purpose of the DocumentFragment node type?
A. To hold a portion of a document
B. To split the document into fragments
C. To hold the entire document
D. To hold the fragments
Show Correct Answer
Correct Answer is :
To hold a portion of a document
20. How many nodetype – named constants are available?
A. 13
B. 11
C. 12
D. 10
Show Correct Answer
Correct Answer is :
12
Similar Interview Questions
Search for latest jobs
Find Jobs