The target element to which the event listener will be attached.
The name of the event to listen for (e.g., 'click', 'scroll').
The callback function to execute when the event occurs.
Optional
options: boolean | AddEventListenerOptionsOptional parameters for the event listener.
A utility function to add an event listener to a specified element.
This function adds an event listener for the specified event type and returns a function that can be called to remove the event listener.