The relatedTarget property is a read-only property that returns an element related to the element that triggered the mouse event. When used with mouseover event, it indicates the element the cursor just exited. When used with mouseout event, it indicates the element the cursor just entered.
Its syntax is:- event.relatedTarget
Its return is:- reference to related element, or null