lastChild Method

Returns the last child node of the caller’s node.

lastChild();

Return Value

If this node has child nodes, the return value is its last child node (of type SGNode). Otherwise, the return value is null.

Remarks

In the current implementation, if the node has many children (more than a hundred), calling its lastChild()  method might slow down performance. Use this method with caution in some scenarios (e.g., loops).