The addEventListener() method of the EventTarget interface sets up a function that will be called whenever the specified event is delivered to the target.
addEventListener()
MDN Reference
Optional
The
addEventListener()method of the EventTarget interface sets up a function that will be called whenever the specified event is delivered to the target.MDN Reference