Traverses the DOM
Each node in the DOM tree is an object representing a single element on the page. Nodes understand their relationship to other nodes in their immediate vicinity , and contain a good deal of information about themselves. The parent of any node is the node that is one level above it, or closer to the document in the DOM hierarchy .The children of a node are the nodes that are one level below it. The siblings of a node are any node on the same tree level in the DOM. All properties, except childNodes, contain a reference to another node object. The childNodes property contains a reference to an array of nodes. There are several standard methods one can use to select one or more nodes from an HTML document. The three most popular are:
The child Nodes returns a collection of a node's child nodes and the length property to determine the number of child nodes. You can loop through all child nodes for retrieving the information of child nodes.