This example uses the addEventListener() method to attach a "mouseenter" and "mouseleave" event to a h1 element.