childElement
The childElement property in JavaScript is a read-only property of an Element object. It returns the first child element of the element it is called on. A child element is defined as an Element node that is a direct descendant of another Element node. This means that text nodes, comment nodes, or processing instruction nodes that might be between the parent and its first child element are ignored by this property.
If the element has no child elements, the childElement property will return null. This property is part
Using childElement can simplify code when you only need to interact with the immediate first child element