Which is the most preferred way of handling events?

Questions & AnswersCategory: Programming LanguageWhich is the most preferred way of handling events?
Adam asked 3 years ago

Which is the most preferred way of handling events?

a. Registering a listener to an element.

b. Writing the JavaScript as an attribute to an element.

c. Referencing an element with the event and assigning a function as a value.