For example, if there’s an <li> element sits as the child of an <ol> element, then calling the parentNode property on the <li> element would return a reference to the <ol> which is its parent node.
The parentNode property is read-only and so we can’t assign a value to it.
The return value of this property is the parent node of the target node that is invoking this property.
- If the target node does not have a parent, then the value of this property will be a null value.
- Doesn’t matter what type of node the parent is, using this property, we can get a reference to that parent node.