Parent & Child System | Sololearn: Learn to code for FREE!

+2

Parent & Child System

I don't understand how it really works. Any help?

3/5/2019 10:40:56 PM

Coffee&Data

2 Answers

New Answer

+6

I believe this is the part you talking about Working with DOM Each element in the DOM has a set of properties and methods that provide information about their relationships in the DOM: element.childNodes returns an array of an element's child nodes. element.firstChild returns the first child node of an element. element.lastChild returns the last child node of an element. element.hasChildNodes returns true if an element has any child nodes, otherwise false. element.nextSibling returns the next node at the same tree level. element.previousSibling returns the previous node at the same tree level. element.parentNode returns the parent node of an element. Refer back to the lesson https://www.sololearn.com/Play/JavaScript

+2

Thanks