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