What is the property to access the first child of a node?

What is the property to access the first child of a node?
A. timestamp.Child1
B. timestamp.Child(1)
C. timestamp.Child(0)
D. timestamp.firstChild
 
Answer: d
Explanation: The first child of a node can be accessed using the firstChild property. firstChild returns the first child node as an element node, a text node or a comment node (depending on which one’s first).
 

Tìm kiếm

Back
Top