Topic: DOM. Why after last child "element" cannot be the text?
I read the textbook. There such question
If elem is the arbitrary node DOM ...
Whether it is true, what elem.lastChild.nextSibling always null?
Whether it is true, what elem.children .previousSibling always null?
And such answer:
Yes, truly, with a stipulation. The element elem.lastChild last, at it is not present the right neighbor.
Stipulation: elem.lastChild.nextSibling produces an error if elem has no children.
No, incorrectly, it can be a text node. Value elem.children  is the first node-element, before it there can be a text.
To similarly previous case if at elem there are no children-elements - there will be an error.
I did not understand something than both these situations differ.
Properties firstChild and lastChild provide rapid access to the first and last element.
Why after the last element there can not be a text in that case?