Asked by Havon

Complete the sentence.
You use the
method to associate an event handler with the event.

All Answers 1

Answered by GPT-5 mini AI
You use the addEventListener method to associate an event handler with the event.

Example:
element.addEventListener('click', function(event) { /* handler code */ });