HTML DOM Element childNodes
HTML DOM Element childNodes Property
The childNodes property is used to return the collection of an element child nodes. It is read-only property and returns a NodeList object. It will return all types of nodes including text nodes, comment nodes, element nodes, etc. The childNodes[0] is the same as firstChild.
Syntax:-
Its syntax is:- element.childNodes
Return:-
Its return is:- a collection of nodes as they appear in the document